Commit Graph

73 Commits

Author SHA1 Message Date
Despacito696969
ecfea027a0 Fixed marshal_to_writer not supporting i128
Previously json.marshal(i128(696969)) would print 0 as there was no `u = i128(i)` initialization.
2022-08-26 23:49:33 +02:00
Michael Kutowski
b739044e69 Update marshal.odin 2022-08-12 13:59:11 +02:00
Michael Kutowski
9e0107c9fc add new soa type, my bad wasnt on master 2022-08-12 13:50:19 +02:00
Michael Kutowski
107e016508 switch styling and opt.spaces max 2022-08-12 13:42:19 +02:00
gingerBill
57b20e634b Merge branch 'master' into pretty-json-2 2022-08-11 16:14:27 +01:00
Michael Kutowski
425dec8bb8 add uint as hex option 2022-08-08 18:28:28 +02:00
gingerBill
5e3cf45df3 Add #soa pointer type to aid with refactoring to #soa data types
a: #soa[16]Foo
p := &a[6]
#assert(type_of(p) == #soa^#soa[16]Foo)
p^.x = 123
p.x = 123
2022-08-08 15:07:00 +01:00
Michael Kutowski
53e0d182af ...bad paste 2022-08-05 18:56:14 +02:00
Michael Kutowski
a6fa41e290 marshal output options with pretty option and other config 2022-08-05 18:53:29 +02:00
William Roe
d913155972 Fix bug unmarshalling JSON with assertions disabled
When asserts are disabled, code within the assert isn't run. Having
expect_token within an assert means that the state of the Parser is
mutated when asserts are run, but not when they aren't.

There's already a wrapper procedure for this pattern, which I have
reused here.
2022-07-28 13:56:14 +01:00
gingerBill
c90b7c38f1 Rename strings.Builder procedures to be consistent with the rest of the core library 2022-07-11 11:50:08 +01:00
gingerBill
f2ecda8fec Rename to SJSON for the Simplified JSON notation variant 2022-06-16 15:49:08 +01:00
gingerBill
38ff2a3ed9 Minor fix 2022-06-11 15:57:56 +01:00
gingerBill
3ec70c5517 Merge functionality of #maybe with the standard 'union' functionality 2022-05-23 12:04:19 +01:00
Jeroen van Rijn
a30b9b17b3 [json/unmarshal] Fix quoted strings. 2022-04-19 20:32:22 +02:00
Jeroen van Rijn
29b2c04766 Revert "Fix unmarshal for escaped strings."
This reverts commit 581255bf23.
2022-04-19 20:11:02 +02:00
Jeroen van Rijn
581255bf23 Fix unmarshal for escaped strings. 2022-04-19 20:04:38 +02:00
gingerBill
1baeb9406f Utilize union #shared_nil in more places 2022-03-24 12:11:31 +00:00
gingerBill
f0529535e0 ODIN_ENDIAN changed to an enum constant; ODIN_ENUM_STRING is the new string version of the old constant 2022-01-15 17:53:18 +00:00
Phil H
a7138b22a5 Fix 'unmarsal' typo 2021-12-05 19:04:14 -08:00
gingerBill
a75dc9d86d Fix minor issue with unmarshal for booleans 2021-11-13 19:07:16 +00:00
Daniel Gavin
5b074ceee5 Add json encoding test + fix enum not being set on success. 2021-11-07 14:35:52 +01:00
gingerBill
cdf881a378 Fix json.marshal for Matrix 2021-10-20 15:02:55 +01:00
gingerBill
2d2e3ed6a1 Remove dead code 2021-10-02 14:04:52 +01:00
gingerBill
21a06df5e1 Add alias for MJSON as Bitsquid 2021-10-02 14:04:41 +01:00
gingerBill
19ac822e4a Improve reflect.Type_Info_Complex support 2021-09-29 15:08:45 +01:00
gingerBill
9d797ea225 Add more support for complex types 2021-09-29 15:02:51 +01:00
gingerBill
aac290e366 Clean up json.marshal_to_writer 2021-09-29 14:50:53 +01:00
gingerBill
c22f2866c7 Remove fmt dependency 2021-09-29 13:18:06 +01:00
gingerBill
9bc12e3f38 Improve json.marshal error handling for io.Writer; Add docs for the different JSON specifications 2021-09-29 13:06:03 +01:00
gingerBill
d452758afc Improve MJSON handling 2021-09-28 15:01:11 +01:00
gingerBill
c933054872 Support json.Specification.MJSON
https://bitsquid.blogspot.com/2009/10/simplified-json-notation.html
2021-09-28 14:53:16 +01:00
gingerBill
ea0bf05727 Make it clear that integers are parsed separately from floats 2021-09-28 12:18:11 +01:00
gingerBill
14a3ddb9af Allow for union{T} like types in json.unmarshal 2021-09-25 18:05:35 +01:00
gingerBill
6a271355a6 Add json.unmarshal 2021-09-25 17:47:45 +01:00
gingerBill
720884e0f1 Strip even more semicolons if followed by a } or ) on the same line 2021-08-31 23:47:57 +01:00
gingerBill
251da264ed Remove unneeded semicolons from the core library 2021-08-31 22:21:13 +01:00
gingerBill
18a0fa02c5 Add multi pointers to core 2021-08-21 23:16:14 +01:00
gingerBill
f293d7c997 Update package encoding/json for or_return 2021-08-15 23:11:15 +01:00
gingerBill
effecf8595 Fix typo 2021-08-15 11:13:59 +01:00
gingerBill
db3501f61b [Breaking] Change the layout json.Value to be a union rather than a struct of a json.Pos and the union 2021-08-08 12:59:35 +01:00
gingerBill
86649e6b44 Core library clean up: Make range expressions more consistent and replace uses of .. with ..= 2021-06-14 11:15:25 +01:00
gingerBill
54e6c50769 Implement f16 functionality 2021-04-01 10:06:00 +01:00
gingerBill
a60d22fefd Make trailing comma usage consistent 2021-03-13 21:18:07 +00:00
gingerBill
41b854f192 Remove #opaque types 2021-02-23 15:45:06 +00:00
gingerBill
595885d3db Remove bit_field in type info, runtime, and general core library 2021-02-19 11:36:23 +00:00
gingerBill
3bcccf88d5 vet all core packages 2021-01-09 23:43:34 +00:00
gingerBill
18da0b3418 Integrate package io into core library 2020-12-03 10:45:26 +00:00
gingerBill
1acd5acd70 Remove unused variable 2020-11-25 16:28:13 +00:00
gingerBill
dbaf4d24f6 Update package json for new map layout; Correct llvm-api includes for *nix 2020-11-25 16:19:56 +00:00