| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* fixes #21638; `fromJson` should supports empty objects
* complete the logic
|
|
|
|
|
| |
* remove legacy code
* fixes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stdlib organization & documentation improvements
* fix CI
* Update doc/lib.md
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* fix ci, remove jshttpcore, export in jsfetch instead
* fix alphabetical order violations
* add cmdline, db_odbc
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
|
|
|
|
|
| |
* Add better error messages
* Add fmt on tuple msg
|
|
|
|
|
|
|
|
|
|
|
| |
* Add test for tuple being invalid size
* Test tuple size before accessing fields
* Fix formatting for import
* Fix not being able to build from csources_v1
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* Added tests
* Fix expected string
* Allow hooks to take an optional parameter that is the current options
* Add options to hooks for other generic types
* Fix doc links
|
| |
|
|
|
|
|
| |
* enable nimPreviewJsonutilsHoleyEnum [backport]
* docuement nimPreviewJsonutilsHoleyEnum
|
|
|
|
|
|
| |
* Add optional recursive arg to distinctBase
* Add docs and examples
Co-authored-by: ALANVF <alan.invents@gmail.com>
|
|
|
|
|
| |
* up to 20x faster jsonutils deserialization
* noinline
|
|
|
|
|
|
| |
* simplify extccomp.nim json logic via jsonutils
* fix #18084
* simplify further
* workaround for bootstrap that can be removed after updating csources_v1 >= 1.2
|
|
|
|
|
| |
* jsonutils.toJson now serializes JsonNode as is (without deep copy nor treating it as a regular ref object)
* JsonNodeMode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbolName; add symbolRank (#18029)
* jsonutils: add customization for toJson via `ToJsonOptions`
* add enumutils.symbolRank
* lookup table implementation for HoleyEnum
* cleanup
* changelog
* fixup
* Update lib/std/jsonutils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
* 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
|
|
|
|
|
| |
* jsonutils: support cstring (including as Table key); improve docs
* changelog
* un-disable a test now that #16061 was fixed
|
|
|
|
|
|
|
| |
uint|uint64 (#17389) [backport:1.2]
* fix #17383: json.%,to and jsonutils.formJson,toJson now works with uint|uint64
* fixup
* fix for js
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* jsonutils: fromJson forward opt param fix
* jsonutils: object in object test + fix: opt pass
|
| |
|
|
|
|
|
| |
* Fix broken links in docs
* Fix rand HSlice links
|
|
|
|
| |
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add some enhancements to `jsonutils.nim`
* Use `jsonutils.nim` hookable API to add a possibility to deserialize
JSON arrays directly to `HashSet` and `OrderedSet` types and
respectively to serialize those types to JSON arrays.
* Also add a possibility to deserialize JSON `null` objects to Nim
option objects and respectively to serialize Nim option object to JSON
object if some or to JSON `null` object if none.
* Move serialization/deserialization functionality for `Table` and
`OrderedTable` types from `jsonutils.nim` to `tables.nim` via the
hookable API.
* Add object `jsonutils.Joptions` and parameter from its type to
`jsonutils.fromJson` procedure to control whether to allow
deserializing JSON objects to Nim objects when the JSON has some
extra or missing keys.
* Add unit tests for the added functionalities to `tjsonutils.nim`.
* improve fromJsonFields
* Add changelog entry for the jsonutils enhancements
* Add TODO in `jsonutils.nim`
* Added an entry to "Future directions" section in `jsonutils.nim` as
suggestion for future support of serialization and de-serialization of
nested variant objects.
* Added currently disabled test case in `tjsonutils.nim` for testing
serialization and de-serialization of nested variant objects.
* Move JSON hooks to `jsonutils.nim`
Move `fromJsonHook` and `toJsonHook` procedures for different types to
`jsonutils.nim` module to avoid a dependency of collections modules to
the `json.nim` module.
The hooks are removed from the following modules:
* `tables.nim`
* `sets.nim`
* `options.nim`
* `strtabs.nim`
* Add some tests about `StringTableRef`
Add tests for `StringTableRef`'s `fromJsonHook` and `toJsonHook` to
`tjsonutils.nim`.
* Disable a warning in `jsonutils.nim`
Mark `fun` template in `jsonutils` module with `{.used.}` pragma in
order to disable `[XDeclaredButNotUsed]` hint. The template is actually
used by the `initCaseObject` macro in the same module.
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
| |
|
|
|
|
|
| |
* make toJson more robust
* properly handle array
|
|
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
|