aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/json
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5882 from IllusionMan1212/custom-json-marshallingJeroen van Rijn2026-01-012-3/+164
|\ | | | | encoding/json: custom json (un)marshalling
| * Make custom JSON (un)marshalers more like core:fmt'sJeroen van Rijn2025-12-102-61/+200
| |
| * encoding/json: error handling for custom (un)marshallersHisham Aburaqibah2025-12-022-4/+4
| |
| * encoding/json: custom json (un)marshallingIllusionMan12122025-12-022-44/+66
| |
* | [encoding/json] Allow Unmarshalling to `rune`dozn2025-12-302-0/+10
| | | | | | | | Fixes https://github.com/odin-lang/Odin/issues/6061
* | [encoding/json] Fix Escapes When Marshallingdozn2025-12-301-3/+3
| | | | | | | | | | | | Fixes https://github.com/odin-lang/Odin/issues/6060 and https://github.com/odin-lang/Odin/issues/6075 The boolean "true" was setting `html_safe` instead of `for_json`. Chalk one up for the "use enums instead of booleans" crowd.
* | Moved `first_iteration` up a couple lines so it makes sense readability-wise.dozn2025-12-301-1/+1
| |
* | Add JSON5/SJSON Comments When Marshallingdozn2025-12-291-0/+26
| | | | | | | | | | | | Allows user-facing JSON5/SJSON to have comments explaining field usage. `json.Marshal_Options.pretty` must be enabled since we only use single-line comments (not to mention it wouldn't be terribly useful without `pretty` set anyways). We don't escape anything, so `\n` will display as "\n", but you're still able to enter in a proper newline character and it'll be displayed on multiple lines.
* | Fix standard json parsing / unmarshalling issue for pure arraysSylphrena2025-12-292-11/+11
|/
* encoding/json: clone unquoted stringsNeirokan2025-11-062-15/+17
|
* Link doc lines to source specifications.Jeroen van Rijn2025-10-101-1/+1
|
* Render examples.Jeroen van Rijn2025-10-101-10/+12
|
* Further overhaul of package line comments.Jeroen van Rijn2025-10-092-2/+1
|
* package lines for encodingJeroen van Rijn2025-10-091-0/+2
|
* Followup fix to #4895Courtney Strachan2025-10-051-3/+1
|
* Merge branch 'odin-lang:master' into masterCourtney Strachan2025-10-063-21/+45
|\
| * Change `is_utf16` field to `encoding` and use an enumgingerBill2025-08-051-1/+1
| |
| * Begin supporting `string16` across the core librarygingerBill2025-08-022-5/+7
| |
| * Clarify `strconv.append_*` to `strconv.write_*`Feoramund2025-06-051-4/+4
| |
| * Merge pull request #4944 from dozn/masterLaytan2025-05-151-8/+14
| |\ | | | | | | [core:encoding/json] When Unmarshalling, Only Match On Struct Tags If Present
| | * [core:encoding/json] When Unmarshalling, Only Match Struct Tags If Presentdozn2025-03-171-8/+14
| | |
| * | Fix typo in private functionEly Alon2025-04-281-2/+2
| | |
| * | fix unmarshalling bit sets in jsonLaytan Laats2025-03-221-2/+18
| |/ | | | | | | Fixes #4761
* / Fixed json null value parsingCourtney Strachan2025-03-021-1/+7
|/
* encoding/json: marshal enumerated arrays to objects with key-value pairsjkenda2025-02-011-3/+13
|
* Remove unnecessary string() conversion.dozn2024-12-281-1/+1
|
* Use Struct Tags For Embedded (with `using`) Structs When Unmarshalling JSONdozn2024-12-281-1/+1
| | | A fix for https://github.com/odin-lang/Odin/issues/4539
* fix #4536 - stack buffer overflow for size_of 0 types in struct unmarshalLaytan Laats2024-12-061-1/+1
|
* Merge pull request #4562 from dozn/patch-1gingerBill2024-12-061-3/+3
|\ | | | | Move Struct Field Zipping Outside of Loop
| * Move Struct Field Zipping Outside of JSON Token Loopdozn2024-12-051-3/+3
| |
* | Fix #4537gingerBill2024-12-051-0/+1
|/
* Fix #4549gingerBill2024-12-021-1/+1
|
* fix unmarshal unhandled error (#4515)o:tone2024-11-251-1/+1
| | | * fix unmarshal unhandled error
* Check for more errors in json.unmarshalgingerBill2024-11-141-15/+34
|
* Remove relative types from json marshallergingerBill2024-11-141-6/+0
|
* encoding/json: fix leak when string is unmarshalled into non-string fieldLaytan Laats2024-10-191-5/+10
| | | | Fixes #4391
* unmarshal bitset ints like cbor doesjakubtomsu2024-09-041-1/+24
|
* Allow json to unmarshal empty struct.Jeroen van Rijn2024-07-211-2/+1
|
* Merge pull request #3910 from VladPavliuk/json-add-int-key-map-supportgingerBill2024-07-142-41/+67
|\ | | | | Allow to `marshal` and `unmarshal` maps with int keys
| * Merge branch 'master' into json-add-int-key-map-supportVladPavliuk2024-07-141-0/+5
| |\
| * | Allow to `marshal` and `unmarshal` maps with int keysVladPavliuk2024-07-132-41/+67
| | |
* | | Reduce the size of `runtime.Type_Info`gingerBill2024-07-142-2/+2
| |/ |/|
* | Align ignore syntax of json tags with fmt, cborVladPavliuk2024-07-141-3/+6
| |
* | Add support of `ignore` tag for `json.marshal`VladPavliuk2024-07-131-1/+3
|/
* Fix loads of indentation issues with mixing spaces and tabsgingerBill2024-06-291-4/+4
|
* Merge branch 'odin-lang:master' into fix-omitempty-commakorvahkh2024-06-133-41/+42
|\
| * Port `tests\core\encoding\json`Jeroen van Rijn2024-06-023-41/+42
| |
* | encoding/json: Fix struct marshal() emitting comma after omitted fieldkorvahkh2024-05-271-15/+17
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously: ```odin package main import "core:fmt" import "core:encoding/json" T :: struct { a: string `json:",omitempty"`, b: string, } main :: proc() { data, _ := json.marshal(T{b = "foo"}) fmt.println(string(data)) } ``` would output: ``` {,"b":"foo"} ``` which is not correct. Also cleaned up some whitespace while I'm at it.
* fix(core/encoding/json): remove Unsupported_Type return when marshalling bit_setIllusionMan12122024-05-251-2/+0
|
* encoding/json: Properly marshal `#no_nil` unionskorvahkh2024-05-111-5/+8
| | | | | Previously the first variant of a `#no_nil` would always be output as `null`, and following variants would be treated as the wrong type.