spinanico / jsonable Goto Github PK
View Code? Open in Web Editor NEWSimple package for converting Dart class to Json
License: Other
Simple package for converting Dart class to Json
License: Other
I don't know how to use JMap type,
Please give me example
{id:100, items: { 'pc': {price: 500, title: 'a01'},'nb': {price: 100, title: 'b01'} }}
════════ Exception caught by gesture ═══════════════════════════════════════════════════════════════
The following JsonUnsupportedObjectError was thrown while handling a gesture:
Converting object to an encodable object failed: _LinkedHashMap len:1
`
var p = Person(id:100,contact: {'pc':Contact(price:500,title:'a01') , 'nb':Contact(price:100,title:'b01')} );
print(p.toJson());
class Person with Jsonable {
JNum id;
JMap<String, Contact> contact;
Person({id,contact}) {
this.id = this.jNum("id", initialValue:id);
this.contact = this.jMap<String, Contact>("contact", builder: () => Contact()
, initialValue:contact);
}
}
class Contact with Jsonable {
JNum price;
JString title;
Contact({price,title}) {
this.price = this.jNum("price", initialValue: price);
this.titl = this.jString("title", initialValue: title);
}
}
`
class json with Jsonable { JList row; }
json.removeAt(0);
{"row":[{"type":"panel"},{"type":"detail"}]}
Unhandled Exception: Stack Overflow
E/flutter (11741): #0 CJlist.removeAt (package:jsonable/src/typing/CJlist.dart:201:3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.