Dominik Picheta
793d6efffb
Fixes null handling for object refs in JSON unmarshal macro.
2017-04-17 18:43:31 +02:00
Dominik Picheta
b829092c9e
Add support for BiggestInt in JSON unmarshal macro.
2017-04-17 18:01:38 +02:00
Dominik Picheta
2108dcf0d5
Fix JSON macro bug with ref objects.
2017-04-17 18:01:38 +02:00
Dominik Picheta
88cb40cd31
Implement support for enum fields in JSON macro.
2017-04-09 17:22:40 +02:00
Dominik Picheta
bd58a0d67c
Use doAssert in JSON macro and improve diagnostics.
2017-04-09 17:04:31 +02:00
Dominik Picheta
7ac0c15e7a
Improve documentation in the JSON module.
2017-04-09 13:09:59 +02:00
Dominik Picheta
eedc6fecd7
Document to macro in JSON and add example.
2017-04-09 12:48:07 +02:00
Dominik Picheta
a883424d0d
Implements else branch for JSON unmarshalling of object variants.
2017-04-09 11:49:50 +02:00
Dominik Picheta
658467a31f
Improve error messages and add tests for the JSON macro.
2017-04-08 22:06:57 +02:00
Dominik Picheta
cc223ff7d8
Support int, string and bool fields in unmarshal json macro.
2017-04-08 21:23:35 +02:00
Dominik Picheta
12aafb25cc
First implementation of JSON unmarshal macro.
2017-04-08 20:55:32 +02:00
Dominik Picheta
cdfcc12529
Implement json.% for enums.
2017-04-06 21:56:20 +02:00
Emery Hemingway
2ba374f9ab
match json.toPretty style with NodeJS's stringify ( #5406 )
2017-02-21 20:24:55 +01:00
Lolo Iccl
abe5cb82a0
Fix for #5134 (parseJson(string) should fail on leftover data) ( #5203 )
2017-01-11 06:50:18 +01:00
Andreas Rumpf
585a970106
json.toUgly also uses optimized string routines
2016-11-21 15:16:54 +01:00
Andreas Rumpf
18690d4a61
speed up json core module
2016-11-21 13:54:16 +01:00
Federico Ceratto
5e4708ef3b
Add few JSON examples
2016-09-29 15:56:22 +01:00
Yuriy Glukhov
dddae2ddcc
Fixed frame corruption
2016-08-27 19:34:31 +03:00
Andreas Rumpf
9b365ddfdd
json module: use ordered tables instead of ordinary tables
2016-08-25 20:28:21 +02:00
Andreas Rumpf
0834cd63d9
prepare Nim codebase for upcoming parser changes
2016-07-15 12:56:03 +02:00
Federico Ceratto
a505fa631d
Fix "string literal as key expected" error
...
Fix "Error: string literal as key expected expected"
2016-07-09 17:25:57 +01:00
Andreas Rumpf
019ee2260c
fixes #4399
2016-07-08 11:05:48 +02:00
Rostyslav Dzinko
d913ec1685
Implemented in operator support for JsonNode objects
2016-06-17 14:08:54 +03:00
Federico Ceratto
0fe414150e
Add value creation/update to the usage example
2016-06-11 15:52:36 +01:00
A. S. Budden
9150645103
Corrected comments in json pretty/ugly procedures ( fixes #4255 ).
2016-06-02 13:38:43 +01:00
Andreas Rumpf
48f3054404
Merge pull request #4135 from FedericoCeratto/patch-8
...
Add another JSON example
2016-05-28 19:42:24 +02:00
Yuriy Glukhov
6e135468f8
Json serialization for openarrays and objects
2016-05-13 17:25:40 +03:00
Federico Ceratto
36be28aa47
Add another JSON example
...
JSON generation can be a bit tricky, another example might help
2016-05-05 22:02:48 +01:00
Yuriy Glukhov
181c834a93
Added json.getOrDefault along with {singleKey} tr optimization.
2016-04-06 14:16:30 +03:00
Dominik Picheta
3379646c16
Add -d:nimJsonGet flag for json.[] and news entry.
2016-04-05 21:28:53 +01:00
Dominik Picheta
c90df48293
Fixes JSON module problems. Fixes #3107 .
2016-04-04 21:52:10 +01:00
Andreas Rumpf
3b732259c0
Merge pull request #4009 from PMunch/json-objecthashing-fix
...
Changed the JSON object hashing procedure (fixing #3972 )
2016-03-29 21:55:49 +02:00
Peter Munch-Ellingsen
794f9527da
Changed the JSON object hashing procedure to use a symmetric operator to disregard key order in object hashes
2016-03-29 18:06:48 +02:00
def
95f4f70f2d
Use nil instead of null in json
2016-03-04 21:45:14 +01:00
def
0179d842dc
Support json null in %*
2016-03-04 19:16:49 +01:00
Yuriy Glukhov
1b4fc744db
Fixed bad JS codegen for new json with tables. Added json to JS tests.
2016-02-29 17:53:52 +02:00
def
ef1d771cf2
Export tables.$ in json module
2016-02-27 23:58:14 +01:00
def
887a8d1f0a
Annotate hash with {.noSideEffect.}
2016-02-24 19:03:55 +01:00
def
9aecdb587b
Initialize JObject fields with capacity 4 by default to save memory and improve performance
2016-02-24 19:03:55 +01:00
def
129499d8e9
Use tables instead of seqs for json objects
...
Significant speedup for some operations, fixes #3809
Not tested very well yet
2016-02-24 19:03:55 +01:00
def
11f055c652
Fix json.%* for empty objects
2016-02-06 03:29:09 +01:00
Daniel Hertz
42975e6338
Add UTF-16 decoding tests to json module
2015-10-13 14:56:10 -04:00
Daniel Hertz
e5bcd287f8
Make sure the json module decodes UTF16 correctly
...
Javascript uses UTF-16 as its internal representation of strings,
so JSON does so as well. This means that we could have surrogate
pairs, with codepoints above 0xFFFF that take 2 ecape codes to
decode.
2015-10-13 14:42:24 -04:00
Yuriy Glukhov
721324380d
Transparently coerce int to float in JsonNode.getFNum
2015-09-17 17:54:01 +03:00
Roger Shi
16fe63180f
test case for #2367
2015-09-10 15:16:01 +08:00
Roger Shi
8f9ce5285f
fix #2367
2015-09-09 11:40:13 +08:00
Dominik Picheta
4a7c1d5fd7
Don't crash on nil in get* procs in the JSON module.
2015-08-06 21:45:52 +01:00
pdw
6914244f30
lib/pure/e-o - Dropped 'T' from types
2015-06-04 13:18:35 +02:00
Flaviu Tamas
55e126c5c8
Clean up JSON tests
2015-05-25 18:13:20 -04:00
Dominik Picheta
59e95c015e
Fixes problems introduced by #2738 . Closes 2755.
2015-05-18 21:57:59 +01:00