Commit Graph

104 Commits

Author SHA1 Message Date
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
Dominik Picheta
60af6a2653 Merge pull request #2747 from def-/json-inline
Make a few json procs inline, improves performance significantly
2015-05-17 18:20:27 +01:00
Dominik Picheta
d937b4cd85 Removes superfluous toUgly, documents toUgly better. 2015-05-17 18:18:33 +01:00
def
46264a0674 Make a few json procs inline, improves performance significantly 2015-05-17 16:13:06 +02:00
onionhammer
30aed77d04 Fixed indentation (2 spaces) part 2 2015-05-16 12:37:07 -05:00
onionhammer
11457bc63b Fixed indentation (2 spaces) 2015-05-16 12:35:55 -05:00
onionhammer
f1343e52e0 Added comment noting improved performance of non-pretty string conversion 2015-05-16 12:33:00 -05:00
onionhammer
edce0ca2ed Fixed typo 2015-05-16 11:38:43 -05:00
Erik O'Leary
911c5d45ec Improved performance of "$" on jsonnode 2015-05-15 22:12:31 -05:00
Oleh Prypin
32109a7867 Don't run non-test code when defined(testing) 2015-04-21 14:37:29 +03:00
Max Grender-Jones
7daad41784 Allow {} to return nested results in json & standardise on 'key' not 'name'
- Note now returns nil if users try to index into a non-object;
  old behaviour was to throw a runtime error
- Also s/transverse/traverse/
2015-04-18 01:08:06 +01:00
Dominik Picheta
caf3d9e342 Added accessor procs with default params for JsonNodes. 2015-04-05 13:42:13 +01:00
def
fd4e629905 Rename PNimrodNode to NimNode 2015-03-17 17:50:32 +01:00
Hans Raaf
58186f6c1d Replaced deprecated repeatChar() with repeat() or spaces(). 2015-03-04 03:30:43 +01:00
Federico Ceratto
c95f6f117a Fix typos 2015-02-15 16:06:06 +00:00
Andreas Rumpf
b25346719d Merge pull request #1869 from def-/json-stuff
Json stuff
2015-02-07 18:34:35 +01:00
def
f3922bc4e5 Fix documentation and toJson signature 2015-02-04 19:27:56 +01:00