81 Commits

Author SHA1 Message Date
yuyi
17f3c8f813
checker: check fn call argument mismatch (fix #23016) (#23061) 2024-12-04 11:52:07 +02:00
Hitalo Souza
14ca0f533f
x.json2: cleanup comments (#22595) 2024-10-20 14:36:56 +03:00
kbkpbot
e83b0d221f
x.json2: make encode number cJson compatible (fix #22363) (#22419) 2024-10-06 11:23:42 +03:00
yuyi
008aaad999
fmt: remove the prefixed module name of const names, that are in the same module (related #22183) (#22185) 2024-09-10 11:25:56 +03:00
Carlos Esquerdo Bernat
4188deb96d
x.json2: support @[skip] as well (#22077) 2024-08-19 15:49:31 +03:00
yuyi
c51d30bf53
fmt: fix alignment of struct init fields (#22025) 2024-08-11 09:11:24 +03:00
Turiiya
f7e820cdeb
v: vet for empty string conditions (#21529) 2024-05-19 17:57:52 +03:00
Turiiya
1a35a783f1
breaking,checker: disallow initializing private struct fields outside structs module (#21183) 2024-04-12 13:53:02 +03:00
Turiiya
f77bb32044
all: fix typos (#21089) 2024-03-25 12:18:27 +02:00
Hitalo Souza
49b7f9a94a
x.json2: predefine buffer capacity for encoding to avoid reallocations (#20920) 2024-03-14 21:23:07 +02:00
Hitalo Souza
6f4d9aecf3
x.json2: minor performance improvement, update benchmark recommendations (#20954) 2024-03-04 12:39:07 +02:00
Hitalo Souza
ac9b724b3b
x.json2: improve performance of string encoding for unicode special characters and emojis (#20867) 2024-03-03 12:02:44 +02:00
johnpgr
87320f8f93
x.json2: fix encoder commas (#20916) 2024-02-27 19:55:02 +02:00
johnpgr
c6048d50bf
x.json2: add skippable field attr @[json: '-'] (improve backwards compatibility with the json module) (#20892) 2024-02-26 21:05:38 +02:00
Hitalo Souza
f472355ef7
json2: reorganize encode string (#20862) 2024-02-18 15:43:15 +02:00
Hitalo Souza
414566966d
Json2: reorganizing functions in files (#20832) 2024-02-15 00:15:07 +02:00
Hitalo Souza
62872c677f
json2: cleanup (#20347) 2024-01-12 22:48:28 +02:00
Anton
763f94388b
all: update copyright year (#20334) 2024-01-01 23:29:54 +02:00
Hitalo Souza
abb0cf774f
x.json2: support sumtype encoding in a more robust way (#20093) 2024-01-01 13:24:32 +02:00
Hitalo Souza
e333d548f3
x.json2: improve performance for checking option values for none (#20325) 2024-01-01 13:10:19 +02:00
Hitalo Souza
7fc31591ad
x.json2: optimise encoding to be faster than cJSON with -prod (#20052) 2023-12-29 18:28:11 +02:00
Delyan Angelov
944b9554bd
x.json2: fix encoding of 💀🐈 etc emojis (fix #20243) (#20247) 2023-12-21 23:44:49 +02:00
Swastik Baranwal
94d288197e
x.json2: add encoder support for time.Time (#20228) 2023-12-20 17:31:20 +02:00
Kim Shrier
cc220e60a5
vlib: change byte to u8 (#19930) 2023-11-19 04:23:32 +03:00
Joe C
757929392e
all: update attributes to use new syntax 2023-11-15 16:16:01 +11:00
Turiiya
e86abe0376
checker: extend byte deprecation warning to array init types (#19671) 2023-10-29 14:22:51 +02:00
Felipe Pena
2c123dffbb
cgen: fix comptimeselector option propagation (#18092) 2023-05-03 08:31:48 +03:00
Hitalo Souza
b0589c645d
json2: encode reference fields too (#17058) 2023-04-28 16:24:27 +03:00
Hitalo Souza
4d4d76d65b
json2: fix encoding of nested maps like map[string]map[string]int (#17924) 2023-04-10 18:57:02 +03:00
Felipe Pena
5c439b6621
cgen: fix auto_str for option values (#17910) 2023-04-10 05:56:57 +02:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
Hitalo Souza
979066856b
json2: encode map (#16928) 2023-03-24 13:45:26 +02:00
Felipe Pena
9a9cfe425c
all: comptime type lowercase ($int, $enum, $option, etc) (#17732) 2023-03-23 00:02:42 +01:00
yuyi
d349c1d86d
checker: check generic fn call argument type mismatch (#17680) 2023-03-16 21:19:03 +02:00
Felipe Pena
785546f277
json2: fix decode result with option fields (#17561) 2023-03-08 20:54:28 +01:00
Felipe Pena
039c9b2550
cgen, checker: fix comptimeselector resolution + if comptime branching improvement + comptimeselector cleanup (#17302) 2023-02-15 11:40:11 +02:00
Hitalo Souza
ed58b95a9d
json2: encode array of all and verify sum type (#17051) 2023-02-01 15:52:58 +01:00
Hitalo Souza
0ac6ba9354
json2: encode sumtype (#17041) 2023-01-21 20:26:55 +02:00
Hitalo Souza
1d51f3109f
json2: improve the performance of encode ~2x (#17050) 2023-01-21 10:45:38 +02:00
Hitalo Souza
55787ff78f
json2: refactor, doc, perf, test, errors (#16986) 2023-01-15 22:52:48 +01:00
Hitalo Souza
28cbaf66b8
json2: refactoring and fixes (#16893) 2023-01-15 12:30:33 +02:00
Hitalo Souza
199db81b23
json2: refactor after #16951 (#16976) 2023-01-14 21:30:29 +02:00
Hitalo Souza
d1306ffcf5
checker,json2: relax checking of x.enum = integer at comptime; refactor json2 to clean it up (#16926) 2023-01-11 10:18:45 +02:00
Hitalo Souza
cf95d77584
json2: small refactor after #16896 (#16911) 2023-01-10 11:08:11 +02:00
Hitalo Souza
33a99fe833
json2: fix encoding of struct fields that are aliases (#16925) 2023-01-09 22:43:01 +02:00
JalonSolov
90941b3b1f
all: change optional to option (#16914) 2023-01-09 09:36:45 +03:00
Hitalo Souza
8f217c00e5
x.json2: refactor/fix json2.encode, add more tests (#16790) 2023-01-05 15:17:38 +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
e8c0b098b0
x.json2: add encode_pretty/1 (#16634) 2022-12-10 20:44:23 +02:00
Hitalo Souza
b6c2aab092
json2: support encoding of optional struct fields (#16521) 2022-12-09 18:08:24 +02:00