- casual json serialization ~80ys (~0.08ms)
- casual json deserialization ~60ys (~0.06ms)
maps json string to Map and vice versa
It decomposes json parsing/loading problems into mapping flat json to key-value pairs and flat map into "k:v," string. Blocks of {} and instance of Map[String,Any] means recursion.
some features and some data types are TBD
(k, v) = chunk separated by ,
splitted by :
leading char of v | resolved as | type |
---|---|---|
t | true | Boolean |
f | false | Boolean |
0 | 0 | Integer |
1 | positibe integral number | Integer | Long |
2 | positibe integral number | Integer | Long |
3 | positibe integral number | Integer | Long |
4 | positibe integral number | Integer | Long |
5 | positibe integral number | Integer | Long |
6 | positibe integral number | Integer | Long |
7 | positibe integral number | Integer | Long |
8 | positibe integral number | Integer | Long |
9 | positibe integral number | Integer | Long |
- | negative integral number | Integer | Long |
" | " + _ + " | String |
n | null | null |
####TBD
leading char of v | resolved as | type |
---|---|---|
u | --- | --- |
e | --- | --- |
{ | --- | --- |
} | --- | --- |
[ | --- | --- |
] | --- | --- |
v match | resolved into |
---|---|
v:String | String(" + v + ") |
null | String(null) |
v: Map[String, Any] | recursion |
v:Any | String(v.toString) |