JSON+ is a JSON library to be used with the Java Virtual Machine.
deftu-archive / json-plus Goto Github PK
View Code? Open in Web Editor NEWA lightweight JSON library made for the JVM.
License: GNU Lesser General Public License v3.0
A lightweight JSON library made for the JVM.
License: GNU Lesser General Public License v3.0
Unless you can give me some proof that it's unable to wrote to the directory because it needs time to create, remove thread.sleep. it blocks the whole thread for a second
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at xyz.matthewtgm.json.serialization.JsonDeserializer.createClassInstance(JsonDeserializer.java:68)
at xyz.matthewtgm.json.serialization.JsonDeserializer.deserialize(JsonDeserializer.java:31)
at dev.fxe.TGMJsonBenchmark.deserialize(TGMJsonBenchmark.java:19)
at dev.fxe.DataGenerator.main(DataGenerator.java:39)
public static void deserialize() throws FileNotFoundException {
BufferedReader bufferedReader = new BufferedReader(new FileReader("people.json"));
String data = bufferedReader.lines().collect(Collectors.joining());
Person[] people = JsonDeserializer.deserialize(data, Person[].class);
}
public class Person {
String fullName;
String firstName;
String lastName;
String address;
int age;
Book favouriteBook;
public Person(String fullName, String firstName, String lastName, String address, int age, String author, String title) {
this.fullName = fullName;
this.firstName = firstName;
this.lastName = lastName;
this.address = address;
this.age = age;
this.favouriteBook = new Book(author, title);
}
}
public class Book {
String author;
String title;
public Book(String author, String tittle) {
this.author = author;
this.title = tittle;
}
}
The file to deserialize
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.