Commit graph

222 commits

Author SHA1 Message Date
Mandeep Singh
7118e1ca01 Example for json.pretty (#10466) 2019-01-30 16:35:45 +01:00
LemonBoy
db2a4d230d Add logic to deserialize tyRange fields from json (#10469) 2019-01-28 09:51:54 +01:00
Christian Lyder Jacobsen
8313e5f24e Use hexadecimal in json escaping (#10437) [backport] 2019-01-25 09:29:32 +01:00
Timothee Cour
32a90f7406 fix json bug []= misplaced (#10397) 2019-01-21 08:24:06 +01:00
Timothee Cour
b8454327c5 json: support tuple (#10010) 2019-01-16 10:16:14 +01:00
Timothee Cour
6cbe1d48d7 [json] document fact that key ordering is preserved (#10020) 2018-12-20 01:13:25 +01:00
Steve Kellock
91c13a0163 [docs/json]: expands existing examples + shows {} operator in action (#9157)
* [docs/json]: expands existing examples + shows {} operator in action

* adds import stmt and fixes butchered syntax in json examples
2018-10-02 20:47:21 -07:00
mashingan
5624036251 Fix #9111; error when parsing to aliased type field 2018-09-29 15:48:01 +07:00
hlaaf
a270899502 Add escapeJsonUnquoted for json escaped strings without quotes (#8785)
* Add escapeJsonUnquoted

* Add tests for escapeJsonUnquoted
2018-08-27 12:22:55 +02:00
Araq
64517445ea even more strict isNil handling for strings/seqs in order to detect bugs 2018-08-22 12:35:46 +02:00
Andreas Rumpf
7f49364fd0 make more tests green 2018-08-13 12:29:03 +02:00
andri lim
f92d61b1f4 fixes #8037, json.to support object with distinct types (#8086)
* add distinct types to json 'to' macro

* fix json 'to' macro and add more test
2018-07-19 16:38:40 +01:00
genotrance
c115090f6e Testament should run tests with no action (#8232)
* Testament should run tests with no action

* Fix strutils tests for JS
2018-07-08 20:38:46 -04:00
hlaaf
a0cb1a80dd
Allow % overloading in %* macro in json (again) 2018-06-06 00:36:56 +03:00
hlaaf
5866e64ebc fix #7881, control characters in json output (#7887)
* fix #7881, control characters in json output

* Add test for control characters in json
2018-05-28 19:15:37 -04:00
Araq
5472574f72 json.nim: delete should raise KeyError, not IndexError, minor cleanup of the tests 2018-05-20 23:00:39 +02:00
Araq
221b34ad83 move parsejson logic into its own standard lib module 2018-05-18 01:49:49 +02:00
Araq
f8e23daa20 fixes #7817 2018-05-14 23:27:44 +02:00
Araq
bbb0fd4eb7 remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
Dominik Picheta
aa48a472fd
Improve deprecation messages in json docs. 2018-04-25 22:56:51 +01:00
Terence Namusonge
e1cd4bca0e
tiny typo 2018-04-25 14:30:54 +02:00
Dominik Picheta
b750082925
Fix docs in json module after #7537 2018-04-15 23:55:54 +01:00
Federico Ceratto
93fafc8545 Add autovivification example (#7537)
* Add autovivification example

* Update json.nim
2018-04-16 00:02:02 +02:00
Andreas Rumpf
1d1d6f39a3 make tests green again 2018-04-13 17:45:58 +02:00
Abhishek Kapatkar
c7cba5e6f0 Fixes #6902 2018-03-30 13:43:01 -07:00
Dominik Picheta
9c2cdc94a2 Fixes #7433. 2018-03-29 11:57:53 +01:00
Andreas Rumpf
083d84ba03 json.nim: documentation copy&paste issue 2018-03-16 15:33:09 +01:00
Oscar Nihlgård
8247323860 Fix json.to for types with generic parameters 2018-02-11 23:15:04 +01:00
Dominik Picheta
578ab935cb Support all int, uint and float variants in json.to macro. 2017-11-30 21:34:30 +00:00
Dominik Picheta
2bb2e6975e Fix infinite recursion when using json.to on ref with cycle. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8d61262372 Implement support for JsonNode in json.to. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8187e83645 Implement Table/OrderedTable support for json.to macro. 2017-11-30 21:34:30 +00:00
Dominik Picheta
8ca41ce637 Implement support for Option[T] in json.to macro. Fixes #5848. 2017-11-30 21:34:30 +00:00
Dominik Picheta
d3c9b58c00 Fixes #6604. Rejects unnamed tuples with error. 2017-11-30 21:34:30 +00:00
Dominik Picheta
e0681715dc Fixes #6095. 2017-11-30 21:34:30 +00:00
Dominik Picheta
11fcae5705 Fixes #5856. Code based on @loloiccl's PR (#5879). 2017-11-30 21:34:30 +00:00
Andreas Rumpf
d12edeeba1 make tests green again 2017-11-17 00:45:40 +01:00
Andreas Rumpf
6a3288a60e more replacements for the deprecated '<' 2017-10-29 08:55:30 +01:00
Daniil Yarancev
5cd6316ac6 Update json.nim (#6513) 2017-10-15 20:08:36 +02:00
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