summary refs log tree commit diff stats
path: root/lib/pure/json.nim
Commit message (Collapse)AuthorAgeFilesLines
* close #18009 parseJson JInt vs JFloat; preserve -0.0 as JFloat to ↵Timothee Cour2021-05-231-1/+1
| | | | distinguish from 0.0 (#18067)
* fix #18007: std/json now serializes nan,inf,-inf as strings instead of ↵Timothee Cour2021-05-161-50/+71
| | | | | | | | | | | | | | | | | invalid json (#18026) * fix #18007: std/json now serializes nan,inf,-inf as raw strings instead of invalid json * fix roundtrip * fix tests * fix changelog * simplify * add runnableExamples * fix typo [skip ci]
* CIs: attempt to use csources_v1 (#16282)Andreas Rumpf2021-04-211-4/+3
| | | | | | | | * CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
* fix #17325 linux 32bit CI; fix #17085 flaky test (#17469)Timothee Cour2021-03-241-3/+4
|
* fix #17490 (#17491)flywind2021-03-241-4/+10
|
* remove {.compileTime.} for procs with NimNode: redundant because of ↵Timothee Cour2021-03-231-2/+2
| | | | tfTriggersCompileTime (#17463)
* remove redundant void return in stdlib (#17464)Timothee Cour2021-03-231-1/+1
|
* followup #17389; add see also in std/json (#17400)Timothee Cour2021-03-161-0/+8
| | | Co-authored-by: flywind <xzsflywind@gmail.com>
* fix #17383: json.%,to and jsonutils.formJson,toJson now works with ↵Timothee Cour2021-03-161-4/+18
| | | | | | | uint|uint64 (#17389) [backport:1.2] * fix #17383: json.%,to and jsonutils.formJson,toJson now works with uint|uint64 * fixup * fix for js
* fix #17275 (#17276)flywind2021-03-091-3/+6
|
* follow up #17165 (#17262)flywind2021-03-041-3/+2
|
* reuse jsffi in json module (#17165)flywind2021-03-041-20/+7
| | | | | | | | | * remove unnecessary when statement * remove outdated codes * reuse jsffi * move js json coverage
* Replace double backticks with single backticks - Part 4 out of ~7 (#17216)Danil Yarantsev2021-03-011-45/+45
|
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-7/+7
|
* remove unnecessary when statement (#17135)flywind2021-02-211-12/+7
|
* added enum indexed array support to json (#16807)Jason Beetham2021-01-261-1/+1
| | | | | | | * added enum indexed array support to json * Added json test * Removed when statement for enum indexed arrays
* Add backwards index overload for `[]` for JsonNode (#16501)Neelesh Chandola2021-01-041-0/+13
| | | | | | | | | | | * Add backwards index overload for `[]` for JsonNode * Add since Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> * Add docs, example, and changelog Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* change some code-blocks to runnableExamples and correct some errors in docs ↵flywind2020-11-121-29/+28
| | | | | | | | | (#15900) * original docs are wrong * fix pathnorm * Update lib/pure/pathnorm.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* fix #15835 (#15838)flywind2020-11-041-0/+2
| | | | | * fix #15835 * add tests
* fix #15815 (#15817)flywind2020-11-021-1/+4
|
* fixes #15413 (#15768)Andreas Rumpf2020-10-291-21/+61
| | | | | | | * fixes #15413 * better hide it properly * see if this makes our list of important packages happy
* json.nim: smaller init size (#15048)Miran2020-07-231-2/+2
| | | | There was a recent `rightSize` change in tables.nim, so the existing value (4) was creating too large tables.
* `toJson`, `jsonTo`, json (de)serialization for custom types; remove ↵Timothee Cour2020-06-081-30/+12
| | | | | | | | | | | | | | | | | | | | | dependency on strtabs thanks to a hooking mechanism (#14563) * json custom serialization; application for strtabs * serialize using nesting * make toJson more feature complete * add since * Revert "Improve JSON serialisation of strtabs (#14549)" This reverts commit 7cb4ef26addb3bb5ce2405d8396df6fd41664dae. * better approach via mixin * toJson, jsonTo * fix test * address comments * move to jsonutils * doc * cleanups * also test for js * also test for vm
* remove isMainModule from json,os,sequtils (#14572)Timothee Cour2020-06-061-233/+2
| | | | | * move json.isMainModule => tjson * move isMainModule => tos,tsequtils
* Improve JSON serialisation of strtabs (#14549)PMunch2020-06-051-6/+29
| | | | This creates a more compact serialisation of strtabs that is more in line with the normal tables.
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-6/+6
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* base `parseEnum` on a case statement, fixes #14030 (#14046)Vindaar2020-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | * base `parseEnum` on a case statement, fixes #14030 * apply simplifactions / clean up, remove `norm` node, use strVal * export `normalize` in json.nim * cmp using nimIdentNormalize, error at CT if ambiguous enum found `nimIdentNormalize` provided by @cooldome. We track all names of the branches we have created so far and error if a duplicate is found. Dummy change to make github react... * fix docstring of `nimIdentNormalize` * make `typ` arg `typedesc`, add lineinfo, call norm. only once
* json doc: Note about Option and reserved keywords (#13895)Nicolai Søborg2020-04-071-0/+7
|
* Removed simpleGetOrDefault (#13590)Andreas Rumpf2020-03-051-2/+4
|
* Improved assertion error messages on usage of JsonNode iterators on wrong ↵Ico Doornekamp2020-02-171-5/+5
| | | | kinds (#13389)
* Fix vertical tab in JSON. (#13399)Khronos2020-02-171-1/+1
| | | '\v' is not injected in JSON anymore
* Revert "printing float values will have one more digit. (#13276) [backport]" ↵Timothee Cour2020-02-081-2/+2
| | | | | (#13363) This reverts commit b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe.
* printing float values will have one more digit. (#13276) [backport]Arne Döring2020-02-071-2/+2
| | | | * printing float values will have one more digit. Fixes #13196
* fix json regression D20191212T144944 (#12902) [backport]Timothee Cour2019-12-151-0/+1
|
* Fixes #12832 (#12842) [backport]Neelesh Chandola2019-12-081-1/+1
| | | | | | * Fix #12832 * nimVm -> nimvm in json.nim * Use suggestSym() instead of markUsed(); Also use styleCheckUse() for finding style violations
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-16/+0
|
* fix several typos in documentation and comments (#12553)Nindaleth2019-10-301-1/+1
|
* Extent json.to testing to VM, add workrounds for VM bugs. (#12493)Arne Döring2019-10-281-50/+127
| | | fixes #12479
* Refactor json macro (#12391)Arne Döring2019-10-171-638/+263
| | | | | | | | * closes #12316 * make tjsonmacro work at js target * closes #12289 * closes #11988 * also fixed gdb related stuff
* [backport] run nimpretty on parsersnarimiran2019-09-301-23/+28
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* json: removed deprecatedGet pragmaAraq2019-09-211-10/+1
|
* fixes #12152 (#12165)Andreas Rumpf2019-09-111-0/+25
| | | | | | * fixes #12152 * makes test green
* fixes #12015 by also checking kind of `typeNode` (#12016)Vindaar2019-08-271-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-2/+2
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-2/+2
| | | | --styleCheck:error
* Added 'keys' iterator to JsonNode (#11597) [feature]Liam Sc2019-07-031-0/+6
|
* Render deprecated pragmas (#8886)LemonBoy2019-06-031-8/+8
| | | | | | | | | * Render deprecated pragmas * fix the expected html * clean up the documentation regarding deprecations * fix typo * fix system.nim * fix random
* fixes #11057 (#11345)Andreas Rumpf2019-05-281-2/+1
|
* make json.to work with the more restricted case objectsAraq2019-05-271-14/+11
|