Giter Club home page Giter Club logo

autojson's People

Contributors

luodijackshen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

autojson's Issues

android studio 2021.3.1 can not use

image

Android Studio Dolphin | 2021.3.1
Build #AI-213.7172.25.2113.9014738, built on September 1, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.6
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
documentation.show.toolbar=true

Non-Bundled Plugins:
wu.seal.tool.jsontokotlin (3.7.4)
idea.plugin.protoeditor (213.6461.28)
com.robohorse.robopojogenerator (2.3.7)
com.ankit.mahadik.json.dart.class (2.15)
cn.neday.excavator (2.2.0)
cn.deemons.tinypng.plugin (2.3)
Dart (213.7371)
com.shenyong.flutter.refgenerator (1.1.0)
io.flutter (70.0.3)

toJson()方法写法错误!

toJson()方法写法错误,会造成 jsonEncode(user) 这样的用法报错!

使用对象时错误如下:

User user = new User("夏目友人帐",'[email protected]');
print(jsonEncode(user));

image

使用插件自动生产的 toJson()代码如下:

Map<String, dynamic> toJson(User instance) => _$UserToJson(instance);

应该改为:

Map<String, dynamic> toJson() => _$UserToJson(this);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.