Miran
bab5e30972
fixes #10963 , disallow implicit mixing of strings and ints/floats ( #11292 )
2019-05-21 21:32:37 +02:00
Miran
2608bc369e
json: add '\v' support, fixes #10541 ( #10987 )
2019-04-10 15:54:49 +02:00
Araq
fda1352ccf
json.nim: tiny refactoring
2019-04-01 16:24:04 +02:00
Andreas Rumpf
f8e720fda9
fixes json.nim regression
2019-03-29 08:01:59 +01:00
narimiran
863848ad56
simplify json.% for tuples and objects
2019-03-11 16:51:06 +01:00
LemonBoy
71df1b060b
Tighten the conversion from tyRange to scalar types ( #10495 )
...
* Tighten the conversion from tyRange to scalar types.
Introduce the `isIntConv` rule for unsigned types.
Do not allow mixed-signedness conversions between ranges and scalar types.
* More json adjustments
2019-02-23 11:52:52 +01:00
Oscar Nihlgård
779c51c29b
Implement json.% for tables and options
2019-02-13 23:30:14 +01:00
Timothee Cour
abcd9fd2e8
fixup #10466 to use runnableExamples ( #10510 )
2019-01-31 07:19:16 +01:00
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