Commit Graph

133 Commits

Author SHA1 Message Date
Daniil Yarancev
e29e6ec76e [JSON] getBVal -> getBool; getFNum -> getFloat 2017-10-14 15:49:53 +03:00
konqoro
5ae82708aa Add default value for filename in parseJson proc (#6441) 2017-09-28 10:35:19 +02:00
Andreas Rumpf
d453bc1d4d fixes #6438 2017-09-28 10:35:45 +02:00
Mamy Ratsimbazafy
5b8f33a905 Reorder json add and %, fixes #6385 (#6388)
* Reorder json `add` and `%`, fixes https://github.com/nim-lang/Nim/issues/6385

* rename json test files
2017-09-16 19:09:44 +01:00
Yuriy Glukhov
7d49fc796d Changed JSON stringification to preserve UTF (#6330) 2017-09-15 10:53:58 +02:00
Yuriy Glukhov
c35cc97b1e Fixed closure compiler incompatibility (#6365) 2017-09-11 17:29:59 +02:00
superfunc
21fcc3507a Update doc for json.to() with limitation (#6334) 2017-09-06 22:55:39 +02:00
Yuriy Glukhov
d13535471b Fixed handling of surrogate pairs (#6332) 2017-09-05 16:42:41 +02:00
Markus F.X.J. Oberhumer
a0f39e0ab4 Ascii character code 127 (DEL) is not printable and must be quoted. (#5984)
This is a follow-up to #5823.
2017-06-15 20:42:23 +02:00
Dominik Picheta
d1daccac2f Fixes #5761. 2017-05-17 16:11:26 +01:00
Daniil Yarancev
40f79e6cdd Small grammar fixes in json.nim (#5758) 2017-04-26 20:29:53 +02:00
Dominik Picheta
03ddfddcae Add test for previous commit. 2017-04-17 20:04:24 +02:00
Dominik Picheta
5a4c06dbdc Support JInt fields for 'float' in JSON umarshal macro. 2017-04-17 19:47:43 +02:00
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