feuermurmel / json Goto Github PK
View Code? Open in Web Editor NEWAn easy to use JSON implementation in Java.
License: Other
An easy to use JSON implementation in Java.
License: Other
JSON does not allow this.
Yeah, add a isNull() function or something to JsonObject, writing someValue == JsonNull.instance is annoying.
We don't have isString() and isNumber() and stuff but most of the time it's know that a value has a certain type or is null.
In the following example, formatted with the default settings of PrettyPrint
, especially the first nested JSON object should probably be wrapped:
{
"testerSettings":{ "verboseLogOutput":true, "sendSdpEnabled":true, "sendAudioEnabled":false, "storeReceivedAudioData":false, "reRegisterTime":600, "inviteHealthCheck":true, "minWaitingTime":360.0, "maxWaitTimeSeconds":120.0, "usedNetworkAddress":"10.100.202.108", "sendAudioFilename":"test.wav" },
"jobSettings":{
"jobType":"CALLEE",
"testerAccount":{ "username":"ahatest*", "host":"ims-info.local", "port":"5090" },
"targetAccount":{ "username":"aha", "host":"ims-info.local", "port":"5090" },
"callerBehaviour":"INVITE_BYE_ONCE",
"calleeBehavior":"WELL_BEHAVED",
"numberOfClients":1,
"numberOfConversations":1,
"commandPerMinute":1000000,
"conversationTime":1000000,
"csvOutputEnabled":true,
"logOutputPath":"logs/",
"allCallerBehaviour":["REGISTER_SEQUENT", "REGISTER_RANDOM", "INVITE_BYE_ONCE", "INVITE_BYE_SEQUENT", "INVITE_BYE_RANDOM"],
"allCalleeBehaviour":["WELL_BEHAVED", "RANDOM_FORGET_30_PERCENT_OF_INVITES", "RANDOM_FORGET_30_PERCENT_OF_BYES", "RANDOM_FORGET_30_PERCENT_OF_INVITE_BYES"]
}
}
With the default settings of PrettyPrint
, there's not space after a colon in JSON objects, making them harder than necessary to read.
Example:
{
"testerSettings":{ "verboseLogOutput":true, "sendSdpEnabled":true, "sendAudioEnabled":false, "storeReceivedAudioData":false, "reRegisterTime":600, "inviteHealthCheck":true, "minWaitingTime":360.0, "maxWaitTimeSeconds":120.0, "usedNetworkAddress":"10.100.202.108", "sendAudioFilename":"test.wav" },
"jobSettings":{
"jobType":"CALLEE",
"testerAccount":{ "username":"ahatest*", "host":"ims-info.local", "port":"5090" },
"targetAccount":{ "username":"aha", "host":"ims-info.local", "port":"5090" },
"callerBehaviour":"INVITE_BYE_ONCE",
"calleeBehavior":"WELL_BEHAVED",
"numberOfClients":1,
"numberOfConversations":1,
"commandPerMinute":1000000,
"conversationTime":1000000,
"csvOutputEnabled":true,
"logOutputPath":"logs/",
"allCallerBehaviour":["REGISTER_SEQUENT", "REGISTER_RANDOM", "INVITE_BYE_ONCE", "INVITE_BYE_SEQUENT", "INVITE_BYE_RANDOM"],
"allCalleeBehaviour":["WELL_BEHAVED", "RANDOM_FORGET_30_PERCENT_OF_INVITES", "RANDOM_FORGET_30_PERCENT_OF_BYES", "RANDOM_FORGET_30_PERCENT_OF_INVITE_BYES"]
}
}
A JSON number size is not limited by the specs (see StackOverflow answer [1]). Therefore, a support for values greater than Long.MAX_VALUE (and values less than Long.MIN_VALUE) would be nice.
My first idea was to represent such integral values as BigInteger, but maybe there are better ways to meet that demand.
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.