How to decode JSON in Flutter?

后端 未结 5 2011
独厮守ぢ
独厮守ぢ 2020-12-05 09:52

How to decode JSON in Flutter?

The question is simple, but the answer isn\'t, at least for me.

I have a project that uses a lot of JSON Strings. Basically, t

5条回答
  •  离开以前
    2020-12-05 10:06

    Just use

    json.decode()
    

    or

    jsonDecode()
    

    In Dart 2 all screaming-case constants were changed to lower-camel-case.

    Ensure to import 'dart:convert';

提交回复
热议问题