1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

55 Commits

Author SHA1 Message Date
2c123dffbb cgen: fix comptimeselector option propagation (#18092) 2023-05-03 08:31:48 +03:00
b0589c645d json2: encode reference fields too (#17058) 2023-04-28 16:24:27 +03:00
4d4d76d65b json2: fix encoding of nested maps like map[string]map[string]int (#17924) 2023-04-10 18:57:02 +03:00
5c439b6621 cgen: fix auto_str for option values (#17910) 2023-04-10 05:56:57 +02:00
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
979066856b json2: encode map (#16928) 2023-03-24 13:45:26 +02:00
9a9cfe425c all: comptime type lowercase ($int, $enum, $option, etc) (#17732) 2023-03-23 00:02:42 +01:00
d349c1d86d checker: check generic fn call argument type mismatch (#17680) 2023-03-16 21:19:03 +02:00
785546f277 json2: fix decode result with option fields (#17561) 2023-03-08 20:54:28 +01:00
039c9b2550 cgen, checker: fix comptimeselector resolution + if comptime branching improvement + comptimeselector cleanup (#17302) 2023-02-15 11:40:11 +02:00
ed58b95a9d json2: encode array of all and verify sum type (#17051) 2023-02-01 15:52:58 +01:00
0ac6ba9354 json2: encode sumtype (#17041) 2023-01-21 20:26:55 +02:00
1d51f3109f json2: improve the performance of encode ~2x (#17050) 2023-01-21 10:45:38 +02:00
55787ff78f json2: refactor, doc, perf, test, errors (#16986) 2023-01-15 22:52:48 +01:00
28cbaf66b8 json2: refactoring and fixes (#16893) 2023-01-15 12:30:33 +02:00
199db81b23 json2: refactor after #16951 (#16976) 2023-01-14 21:30:29 +02:00
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
cf95d77584 json2: small refactor after #16896 (#16911) 2023-01-10 11:08:11 +02:00
33a99fe833 json2: fix encoding of struct fields that are aliases (#16925) 2023-01-09 22:43:01 +02:00
90941b3b1f all: change optional to option (#16914) 2023-01-09 09:36:45 +03:00
8f217c00e5 x.json2: refactor/fix json2.encode, add more tests (#16790) 2023-01-05 15:17:38 +02:00
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
e8c0b098b0 x.json2: add encode_pretty/1 (#16634) 2022-12-10 20:44:23 +02:00
b6c2aab092 json2: support encoding of optional struct fields (#16521) 2022-12-09 18:08:24 +02:00
48a7de643e all: support typeof[ T ]().idx and typeof[ T ]().name, where T can be any type, including ![]&string (#16513) 2022-12-07 11:26:27 +02:00
ef5be22f81 all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
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
6b0743bb07 x.json2: add support for i8, i16, u8, u16, u32 (fix #16484) 2022-11-19 12:03:04 +02:00
74613bd636 x.json2: generic-based encoder (finish PR#15137) (#16464) 2022-11-18 11:09:24 +02:00
f6844e9766 all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
d679146a80 fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
ae6a25f44e websocket, utf: u8 fixes 2022-04-15 16:24:02 +03:00
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Ned
437fa02f27 x.json2: add customized JSON output capability via Encoder (#13654) 2022-03-04 14:39:23 +03:00
ceb05b163a strings: rename Builder.write_b() to Builder.write_byte(), add deprecation (#13313) 2022-01-28 20:34:44 +02:00
c07ce3ff15 cgen,json2: improve -nofloat support (#13117) 2022-01-10 12:42:41 +02:00
59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
1d41d9daf9 json2: improve readability, add tests utilizing fix #12667 (#12836) 2021-12-15 12:20:05 +02:00
1913de0187 x.json2: fix compilation with -autofree 2021-11-28 18:32:04 +02:00
ae54cd78f5 json2: encode ascii chars < 0x20 in json (#12494) 2021-11-18 08:34:00 +03:00
58df35b453 x.json2: fix json_string for utf8 codepoints, add regression test 2021-06-29 11:40:52 +03:00
1bf7d968f9 x.json2: add u64 (#9457) 2021-03-25 16:53:39 +01:00
c76c69ec35 all: simplify return if ... constructs to make more code compatible with -autofree 2021-03-22 16:45:29 +02:00
ee879f3e41 x.json2: proper string encoding + minor fixes (#9026) 2021-03-01 10:22:36 +01:00
8dff168e01 x.json2: create custom scanner for scanning JSON (#8716) 2021-02-26 08:36:02 +02:00
f54c1a5cc2 all: add strings.Builder.write_string and use write_string instead of write (#8892) 2021-02-22 13:18:11 +02:00
e4a67dea37 json2: wrap Builder.free() calls inside unsafe (#8790) 2021-02-17 02:19:26 +02:00
ac2c3847af all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
a9ab79d301 checker: ban any_int/any_float outside buitlin (#7675) 2020-12-31 12:41:30 +01:00
6c634086b0 json2: decode fn returns ?T; add new tests (#6933) 2020-11-29 14:54:45 +01:00