summary refs log tree commit diff stats
path: root/lib/pure/json.nim
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* fixes #1286; object case transitions are now soundAndreas Rumpf2019-05-271-42/+15
|
* fixes #10963, disallow implicit mixing of strings and ints/floats (#11292)Miran2019-05-211-4/+4
|
* json: add '\v' support, fixes #10541 (#10987)Miran2019-04-101-0/+1
|
* json.nim: tiny refactoringAraq2019-04-011-4/+1
|
* fixes json.nim regressionAndreas Rumpf2019-03-291-12/+5
|
* simplify json.% for tuples and objectsnarimiran2019-03-111-13/+7
|
* Tighten the conversion from tyRange to scalar types (#10495)LemonBoy2019-02-231-10/+48
| | | | | | | | | * 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
* Implement `json.%` for tables and optionsOscar Nihlgård2019-02-131-1/+11
|
* fixup #10466 to use runnableExamples (#10510)Timothee Cour2019-01-311-17/+14
|
* Example for json.pretty (#10466)Mandeep Singh2019-01-301-3/+22
|
* Add logic to deserialize tyRange fields from json (#10469)LemonBoy2019-01-281-0/+24
|
* Use hexadecimal in json escaping (#10437) [backport]Christian Lyder Jacobsen2019-01-251-3/+3
|
* fix json bug `[]=` misplaced (#10397)Timothee Cour2019-01-211-5/+5
|
* json: support tuple (#10010)Timothee Cour2019-01-161-1/+16
|
* [json] document fact that key ordering is preserved (#10020)Timothee Cour2018-12-201-0/+7
|