Andreas Rumpf
cb0f7c5d9e
Removed simpleGetOrDefault ( #13590 )
2020-03-05 21:03:39 +01:00
Ico Doornekamp
73553621a1
Improved assertion error messages on usage of JsonNode iterators on wrong kinds ( #13389 )
2020-02-17 09:00:25 +01:00
Khronos
006fe4cfc4
Fix vertical tab in JSON. ( #13399 )
...
'\v' is not injected in JSON anymore
2020-02-17 00:39:19 +01:00
Timothee Cour
e4415422fe
Revert "printing float values will have one more digit. ( #13276 ) [backport]" ( #13363 )
...
This reverts commit b2c6db97f9 .
2020-02-08 09:30:24 +01:00
Arne Döring
b2c6db97f9
printing float values will have one more digit. ( #13276 ) [backport]
...
* printing float values will have one more digit. Fixes #13196
2020-02-07 17:10:25 +01:00
Timothee Cour
e5ed4c1b7d
fix json regression D20191212T144944 ( #12902 ) [backport]
2019-12-15 23:04:06 +01:00
Neelesh Chandola
ff5ef95414
Fixes #12832 ( #12842 ) [backport]
...
* Fix #12832
* nimVm -> nimvm in json.nim
* Use suggestSym() instead of markUsed(); Also use styleCheckUse() for finding style violations
2019-12-08 23:27:25 +01:00
Andreas Rumpf
3ba3307d61
remove deprecated procs ( #12535 )
2019-11-05 11:05:46 +01:00
Nindaleth
34dbc5699e
fix several typos in documentation and comments ( #12553 )
2019-10-30 09:08:45 +01:00
Arne Döring
5ed99f8d3f
Extent json.to testing to VM, add workrounds for VM bugs. ( #12493 )
...
fixes #12479
2019-10-28 10:06:16 +01:00
Arne Döring
21cbfd72ec
Refactor json macro ( #12391 )
...
* closes #12316
* make tjsonmacro work at js target
* closes #12289
* closes #11988
* also fixed gdb related stuff
2019-10-17 09:55:41 +02:00
narimiran
b17ed2ca9c
[backport] run nimpretty on parsers
2019-09-30 13:58:08 +02:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Araq
96b3bae99b
json: removed deprecatedGet pragma
2019-09-21 06:43:37 +02:00
Andreas Rumpf
e134a722de
fixes #12152 ( #12165 )
...
* fixes #12152
* makes test green
2019-09-11 20:28:24 +02:00
Vindaar
eff0837ff4
fixes #12015 by also checking kind of typeNode ( #12016 )
...
* fixes #12015 by also checking kind of `typeNode`
If a tuple field is aliased it'll appear the same as a ref type in a
call to `getType` if only for the kind of the resulting `NimNode` is
checked (that is a `nnkBracketExpr`)
* fix test case due to #12017 and add more realistic test case
Adds an additional test case, which includes generics and is closer to
the real failure I encountered
* remove previous fix and fix differently after all
The previous fix was incomplete, because it failed for generics.
Note that the `of "tuple"` is not actually needed, the
`nnkBracketExpr` branch in the `else` branch would catch it too, but I
decided to introduce it for clarity. However, the latter is actually
needed, because it seems for aliases of `seq` we end up in it.
* update comment about global `%` proc in json test
2019-08-27 22:23:47 +02:00
Araq
07d465ca42
[refactoring] remove unused imports in the compiler and in some stdlib modules
2019-07-18 00:36:03 +02:00
Araq
c94647aeca
styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error
2019-07-10 12:42:41 +02:00
Liam Sc
a157c2baef
Added 'keys' iterator to JsonNode ( #11597 ) [feature]
2019-07-03 08:06:22 +02:00
LemonBoy
7d217a71d3
Render deprecated pragmas ( #8886 )
...
* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
2019-06-03 10:15:20 +02:00
Andreas Rumpf
9d8b4d6020
fixes #11057 ( #11345 )
2019-05-28 15:55:11 +02:00
Araq
383147f5cb
make json.to work with the more restricted case objects
2019-05-27 21:29:02 +02:00
Andreas Rumpf
49e686ab4e
fixes #1286 ; object case transitions are now sound
2019-05-27 21:29:02 +02:00
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