hiranthaR / Json-to-Dart-Model

Json to Dart Model extension can convert JSON objects into Dart data classes. It supports pure Dart class conversion, Flutter-recommended JSON serialization using annotations, Freezed support, Effective Dart:Style, and many more features. Currently, it has more than 135,000 installs.
https://marketplace.visualstudio.com/items?itemName=hirantha.json-to-dart
MIT License
93 stars 17 forks source link

Can't generate model classes gets following exception. #42

Closed zahidshaikh08 closed 3 years ago

zahidshaikh08 commented 3 years ago

Command 'Json to Dart: Convert From ClipBoard' resulted in an error (Running the contributed command: 'jsonToDart.fromClipboard' failed.)

To Reproduce Generate class using clipboard option

Expected behavior It should generate class normally.

Screenshots image

Version 3.2.5

Json

{
    "status": true,
    "message": "Cuisines get successfully.",
    "data": {
        "cuisines": [
            {
                "id": 39,
                "category_id": 2,
                "name": "General"
            },
            {
                "id": 40,
                "category_id": 2,
                "name": "Birthday"
            },
            {
                "id": 41,
                "category_id": 2,
                "name": "Love"
            }
        ]
    }
}

Additional context It was working completely fine but suddenly it just started giving this error.

iamarnas commented 3 years ago

@zahidshaikh08 Hi 👋

Thanks for reporting. Right now I'm on vacation. But I will check it whenever possible. Have you tried reinstalling this extension? And how to run conversion, with hot keys or with command pallet?

zahidshaikh08 commented 3 years ago

Yes i tried reinstalling extension multiple times and i even tried in different mac also but returns the same error.

Btw no worries and enjoy vacation :)

iamarnas commented 3 years ago

@zahidshaikh08 I'm working now with commands and already corrected command subscription. With next version will be more option to run converter, for example from right mouse button context. We will see if after next release will be same problem for you ;)

zahidshaikh08 commented 3 years ago

That's great right mouse button context option will be really be helpful and easy to generate model classes TBH. Looking forward for next release to try it out.

And thanks for your quick feedback and wonderful plugin it really helped me a lot after null safety migration.

zahidshaikh08 commented 3 years ago

Hello @iamarnas any update on this?? As i am still not able to use this plugin in mac although windows plugin works perfectly.

iamarnas commented 3 years ago

@zahidshaikh08 Hi

Hello @iamarnas any update on this??

It is underway and there is not much left. I will completely change the quality of the settings and you will see big difference.

As i am still not able to use this plugin in mac although windows plugin works perfectly.

It stange. Looks like bug is not from my side 😕

iamarnas commented 3 years ago

@zahidshaikh08 can you try to clean VC Code cache folder?

zahidshaikh08 commented 3 years ago

@zahidshaikh08 can you try to clean VC Code cache folder?

I tried clearing cache and even completely reinstalled vs-code but the problem still persists the same as before.

Thats very strange i don't know why its happening?? i even tried in different mac and in that mac also problem is still the same.

Did you tried in different mac??

zahidshaikh08 commented 3 years ago

It is underway and there is not much left. I will completely change the quality of the settings and you will see big difference.

Thats great :) till then i will be waiting for your update on this issue.

iamarnas commented 3 years ago

@zahidshaikh08 Hi,

You can test the new version and see if still throw an error. And of course, try new features actions from the context

zahidshaikh08 commented 3 years ago

Hi @iamarnas,

I tried new version in mac and it seems like issue is resolved as i was able to generate model classes as usual as before.

Thank you for your quick support and thanks for building such a nice and useful tool for folks like us. 🙏

iamarnas commented 3 years ago

Hi @zahidshaikh08

I tried new version in mac and it seems like issue is resolved as i was able to generate model classes as usual as before.

Thank you for your quick support and thanks for building such a nice and useful tool for folks like us. 🙏

I am very happy to hear that it was resolved and hope that it never happens again 🤞

zahidshaikh08 commented 3 years ago

Closing this issue as it's resolved now. 🤗