Home > Enterprise >  Want to convert String into json object in flutter
Want to convert String into json object in flutter

Time:08-15

[{insert: comming comming}, {insert: , attributes: {list: ordered}}]

getting this string response from backend. I want to convert it in a json object , not in json string. I am using flutterQuill editor for rich text , so I want the string as json object , so that I can use it on the flutter quill

CodePudding user response:

you should read this:

https://docs.flutter.dev/development/data-and-backend/json

Basic JSON serialization in Flutter is very simple. Flutter has a built-in dart:convert library that includes a straightforward JSON encoder and decoder.

There are also examples.

CodePudding user response:

Have you checked the official flutter Docs? This is the link: dart-convert -jsonEncode

In there, you can find how it is done.

  • Related