summary refs log tree commit diff stats
path: root/lib/pure/parsejson.nim
Commit message (Collapse)AuthorAgeFilesLines
* make implicit cstring conversions explicit (#19488)ee72022-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Nim manual says that an implicit conversion to cstring will eventually not be allowed [1]: A Nim `string` is implicitly convertible to `cstring` for convenience. [...] Even though the conversion is implicit, it is not *safe*: The garbage collector does not consider a `cstring` to be a root and may collect the underlying memory. For this reason, the implicit conversion will be removed in future releases of the Nim compiler. Certain idioms like conversion of a `const` string to `cstring` are safe and will remain to be allowed. And from Nim 1.6.0, such a conversion triggers a warning [2]: A dangerous implicit conversion to `cstring` now triggers a `[CStringConv]` warning. This warning will become an error in future versions! Use an explicit conversion like `cstring(x)` in order to silence the warning. However, some files in this repo produced such a warning. For example, before this commit, compiling `parsejson.nim` would produce: /foo/Nim/lib/pure/parsejson.nim(221, 37) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] /foo/Nim/lib/pure/parsejson.nim(231, 39) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] This commit resolves the most visible `CStringConv` warnings, making the cstring conversions explicit. [1] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/doc/manual.md#cstring-type [2] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/changelogs/changelog_1_6_0.md#type-system
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* Replace double backticks with single backticks - Part 4 out of ~7 (#17216)Danil Yarantsev2021-03-011-20/+20
|
* use hexchar in stdlib (#16290)flywind2020-12-171-10/+3
|
* fixed to jsonArrayEnd comment. (#13624)めぐみ発動機 (isVowel / GreenWing)2020-03-111-1/+1
| | | typo: start → end
* [backport] run nimpretty on parsersnarimiran2019-09-301-26/+26
|
* parsejson: typoAndreas Rumpf2019-09-101-1/+1
|
* json: add '\v' support, fixes #10541 (#10987)Miran2019-04-101-0/+3
|
* StringStream and parseJson, parseCfg, parseSql et al for the vm (#10746)Arne Döring2019-02-281-44/+32
|
* move parsejson logic into its own standard lib moduleAraq2018-05-181-0/+535
|
* json module changesAraq2011-01-151-484/+0
|
* Added a higher level json module.dom962011-01-111-0/+484