Hitalo Souza
525c5e237a
x.json2: add json2.map_from(t T) ( #16797 )
2023-01-18 18:55:04 +02:00
Hitalo Souza
d7c244e5ec
x.json2: support time.Time values in encode ( #16643 )
...
* feat: json2 time.Time encode
* refactor: best var name
* fix: use 'RFC 3339' as pattern in json encode
* fix: unused var for unaliased_typ
* fix: improve test
* use the clearer test after V ad24c22
, that made format_rfc3339 more stable
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2022-12-11 16:54:28 +02:00
Hitalo Souza
30b39bebde
x.json2: refactor json tests ( #16638 )
2022-12-10 18:44:20 +02:00
Hitalo Souza
b6c2aab092
json2: support encoding of optional struct fields ( #16521 )
2022-12-09 18:08:24 +02:00
Hitalo Souza
5288c613ef
json2: decode refactor/fix ( #16588 )
2022-12-05 16:58:44 +02:00
Hitalo Souza
45854882b9
builtin, cgen: support FieldData.unaliased_typ, use it for generalising x.json2
(able to encode type aliased struct fields) ( #16469 )
2022-11-20 11:18:14 +02:00
Hitalo Souza
74613bd636
x.json2: generic-based encoder (finish PR#15137) ( #16464 )
2022-11-18 11:09:24 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' ( #16428 )
2022-11-15 16:53:13 +03:00
Swastik Baranwal
b584e1df98
checker: allow EnumName(number)
casts only inside unsafe{}
blocks ( #15932 )
2022-10-02 22:39:11 +03:00
Delyan Angelov
1913de0187
x.json2: fix compilation with -autofree
2021-11-28 18:32:04 +02:00
Daniel Däschle
be0c54caf9
checker: require or block for sumtype map ( #11089 )
2021-09-10 16:07:39 +03:00
Daniel Däschle
800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions ( #11035 )
2021-08-04 12:44:41 +03:00
Delyan Angelov
c939e4df97
x.json2: fix direct sum type init
notices
2021-04-11 11:28:52 +03:00
Ned Palacios
c5302bfcf5
x.json2: skip whitespace before scanning ( #9508 )
2021-03-30 09:40:20 +02:00
Ned Palacios
8dff168e01
x.json2: create custom scanner for scanning JSON ( #8716 )
2021-02-26 08:36:02 +02:00
Delyan Angelov
978359a6fc
tests: fix some warnings in preparation for -W test-self
2021-01-31 11:05:17 +02:00
Ned Palacios
6c634086b0
json2: decode fn returns ?T
; add new tests ( #6933 )
2020-11-29 14:54:45 +01:00
Anton Zavodchikov
fe3d2a9aba
json2: unescape characters ( #6836 )
2020-11-15 14:58:17 +02:00
Ned Palacios
fc375a40f8
x.json2: add fast_raw_decode; support for i64 and f32 ( #6586 )
2020-10-09 16:11:55 +02:00
Daniel Däschle
06cade6c31
all: change .ReturnType and .Type to .return_type and .typ ( #6494 )
2020-09-28 06:13:38 +02:00
Ned Palacios
368c2a6bf0
vlib: add x/json2 ( #6336 )
2020-09-10 12:05:40 +02:00