Commit Graph

79 Commits

Author SHA1 Message Date
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
def
46cf40c40d Add mitems and mpairs where it makes sense 2015-01-28 02:31:26 +01:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
def
41cf963848 Remove debugging echos again 2015-01-05 13:19:10 +01:00
def
f223e94ccd Add operator %* to JSON 2015-01-05 01:31:28 +01:00
def
06ad80cc45 indent = 0 looks better for $(node: JsonNode) 2015-01-05 01:30:03 +01:00
Araq
a9a5766c66 docgen should work again 2014-10-05 03:06:19 +02:00
Araq
4523b29d7a Nimrod renamed to Nim 2014-08-28 09:59:26 +02:00
Araq
e12f9518cc more modules updated 2014-08-28 01:54:36 +02:00
Araq
11b6958755 big rename 2014-08-27 23:42:51 +02:00
Araq
2f43fdb837 renamefest 2014-08-23 01:43:49 +02:00
Varriount
99aaefeaae Merge pull request #1289 from fowlmouth/patch-5
json.== handles nil now
2014-07-24 18:05:44 -04:00
Dominik Picheta
38cdd7595e Remove varargs from json.{} 2014-06-22 20:25:38 +01:00
Billingsly Wetherfordshire
bd8f5c8392 json.== handles nil now 2014-06-19 13:00:11 -05:00
Billingsly Wetherfordshire
13608c0a1a fix json.[] 2014-06-17 15:05:50 -07:00
Varriount
13542572ab Update json.nim
Fixed a bug with json.[], which caused a segfault on debug builds.
2014-06-14 22:10:54 -04:00
Dominik Picheta
69a5954807 Capitalised enum value names in JSON module. 2014-06-05 23:12:22 +01:00
Andreas Rumpf
2dba171acc Merge pull request #1174 from fowlmouth/patch-2
added `==` for PJsonNode
2014-06-05 23:43:51 +02:00
Billingsly Wetherfordshire
ac797e1801 added json.hash 2014-06-02 18:13:56 -05:00
Andreas Rumpf
726003ac52 Merge pull request #1089 from flaviut/jsonchange
Allow for nil chaining in JSON and require an exception on out-of-bounds indexing
2014-05-31 20:35:26 +02:00
flaviut
08a76f0466 replace nil checks with assert 2014-05-31 14:18:26 -04:00
flaviut
c7a57dc184 Switch chaining to the {} and {}= operators 2014-05-26 16:13:19 -04:00
Billingsly Wetherfordshire
4099abc867 added == for PJsonNode 2014-05-03 16:49:41 -05:00
flaviut
ec59b790c5 JSON index accesses are bounds checked 2014-04-13 17:49:16 -04:00
flaviut
64d3b9a34d Fix subtle mistake in docs and formatting 2014-04-13 17:27:47 -04:00
flaviut
db7fee6303 Add tests for the nil passthrough 2014-04-13 17:19:59 -04:00