summary refs log tree commit diff stats
path: root/lib/pure/json.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes JS semicolon omissions (#23896)ringabout2024-07-261-1/+1
|
* fix JSON deep copy description (#23495)Pouriya Jamshidi2024-04-121-1/+1
| | | | | | Hi, This is a tiny change, fixing the error in the documentation of JSON's deep copy proc.
* Deprecate asm stmt for js target (#23149)ASVIEST2024-01-021-6/+7
| | | | | | | | | | | | | | | | | | | | | | | why ? - We already have an emit that does the same thing - The name asm itself is a bit confusing, you might think it's an alias for asm.js or something else. - The asm keyword is used differently on different compiler targets (it makes it inexpressive). - Does anyone (other than some compiler libraries) use asm instead of emit ? If yes, it's a bit strange to use asm somewhere and emit somewhere. By making the asm keyword for js target deprecated, there would be even less use of the asm keyword for js target, reducing the amount of confusion. - New users might accidentally use a non-universal approach via the asm keyword instead of emit, and then when they learn about asm, try to figure out what the differences are. see https://forum.nim-lang.org/t/10821 --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* complete std prefixes for stdlib (#22887)ringabout2023-10-301-5/+5
| | | | follow up https://github.com/nim-lang/Nim/pull/22851 follow up https://github.com/nim-lang/Nim/pull/22873
* Markdown code blocks migration part 8 (#22478)Andrey Makarov2023-08-151-6/+12
|
* fixes #22254; fixes #22253; stricteffects bugs on recursive calls (#22294)ringabout2023-07-191-2/+3
|
* small fixes for atomicArc (#22017)ringabout2023-06-061-1/+1
| | | | | * small fixes for atomicArc * Update lib/system/arc.nim
* fix #9423 followup #17594: distinct generics now work in VM (#21816)ringabout2023-05-101-7/+1
| | | | | | | | | * fix #9423 distinct generics now work in vm * fixes cpp tests --------- Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Fix json.to for float fields that are not present (#21695)Yardanico2023-04-211-1/+1
|
* int64/uint64 as bigint in JS (#21613)metagn2023-04-111-1/+1
| | | | | | | | | | | * int64/uint64 as bigint in JS * fix CI * convert to compile option * fix lie * smaller diff, changelog entry
* Use a cast to suppress KeyError raises (#21451)Antonis Geralis2023-02-281-4/+5
|
* minor parseopt.nim improvements (#21256)Andreas Rumpf2023-01-181-0/+1
| | | | | | | * minor parseopt.nim improvements * attempt to make CI happy Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* remove legacy code (#21134)ringabout2022-12-261-293/+291
| | | | | * remove legacy code * fixes
* move formatfloat out of system (#20195)ringabout2022-08-241-1/+1
| | | | | | | | | | | | | | | * move formatfloat out of system * fixes doc * Update changelog.md * careless * fixes * deprecate system/formatfloat * better handling
* replace shallowcopy with move in ARC/ORC (#20061)flywind2022-07-181-6/+6
|
* enable style:usages for stdlib tests [backport: 1.6] (#19715)flywind2022-04-131-6/+6
| | | | | | | | | | | | | | | * enable style:usages for stdlib tests * freeAddrInfo * more tests * importc * bufSize * fix more * => parseSql and renderSql
* move assertions out of system (#19599)flywind2022-03-231-1/+1
|
* move io out of system (#19442)flywind2022-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* [backport:1.0] json: limit recursion depth (#19252)Miran2021-12-141-3/+9
| | | | | * json: limit recursion depth * do not run this check for JS backend
* fixes another effect inference bug [backport:1.6] (#19100)Andreas Rumpf2021-11-071-3/+7
| | | | * fixes another effect inference bug [backport:1.6]
* add [1..2] for JArray (#18525)itsumura-h2021-07-211-0/+18
| | | | | | | | | | | | * add [1..2] for JArray * fix BackwardsIndex to int * fix for BackwardsIndex * fix for assert node kind check * fix variable name * Update lib/pure/json.nim * fix for when x.a is BackwardsIndex Co-authored-by: itsumura-h <dumblepy@mail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* 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
|