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

120 Commits

Author SHA1 Message Date
Felipe Pena
511274a8d4
json: fix raw decode to option string of complex data (#18902) 2023-07-20 02:33:39 +03:00
Felipe Pena
8f3a1751e3
json: fix option state (#18802) 2023-07-09 08:23:24 +03:00
Felipe Pena
7fe794a974
json: fix option alias support (#18801) 2023-07-07 22:03:41 +03:00
yuyi
4dc338863c
checker: fix json decode with generic array of struct (fix #18300) (#18308) 2023-05-30 14:25:33 +02:00
Turiiya
e8046439f0
cgen: include float kind in struct field type defaults (#18228) 2023-05-24 06:50:45 +03:00
Alexander Medvednikov
b9f5cc830b json: skip via the "-" attribute 2023-05-02 16:41:32 +02:00
Felipe Pena
3d50663bcf
json: fix omitempty for alias, struct, sumtype, array and map (#18012) 2023-04-22 10:58:21 +03:00
Felipe Pena
89b7bebc3c
json: fix option sumtype with int types (#18013) 2023-04-22 10:58:01 +03:00
Felipe Pena
c43ea09d87
json: fix -cstrict build + optional map (#18014) 2023-04-22 10:55:25 +03:00
Felipe Pena
488e14bf99
json: allow decode/encode of alias to primitive type (#18003) 2023-04-21 19:39:40 +03:00
Felipe Pena
524f7c3ead
json: fix json with option struct (#17942) 2023-04-13 08:17:40 +02:00
Felipe Pena
319ad5bae2
json: fix json.decode with map alias (#17925) 2023-04-10 19:50:35 +03:00
Felipe Pena
1113205376
json: fix [raw] for option string (#17899) 2023-04-06 18:26:17 +03:00
Felipe Pena
b4e8e812fe
json: fix encode/decode fixed array (#17887) 2023-04-06 01:15:23 +03:00
Felipe Pena
cd6cc65ece
json: fix [omitempty] with string (#17813) 2023-03-30 23:09:47 +03:00
Felipe Pena
75deb66fd4
json: fix decode option string (#17812) 2023-03-29 18:45:41 +02:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
Felipe Pena
278e747c7a
json: make enums work with json encode+decode (serialised as string names by default; the old integer one is supported too, using [json_as_number]) (#17696) 2023-03-22 10:33:32 +02:00
Felipe Pena
2df23a6698
json: fix ptr field access (#17690) 2023-03-18 14:47:40 +02:00
Felipe Pena
b345d77805
json: support field &Type (#17655) 2023-03-16 21:15:14 +02:00
Felipe Pena
23e385ee8a
json: fix json decode/encode with option type (#17393) 2023-03-10 10:49:26 +02:00
yuyi
286350aa9b
cgen: fix json encoding of structs with option fields (skip the fields with a value of none) (#16916) 2023-01-09 15:33:08 +02:00
JalonSolov
90941b3b1f
all: change optional to option (#16914) 2023-01-09 09:36:45 +03:00
yuyi
b8571c964d
cgen: fix json encode struct with optional field (#16866) 2023-01-04 12:41:07 +02:00
yuyi
ef5be22f81
all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +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
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
yuyi
992b502198
db, json, time, term: change optional to result (#16201) 2022-10-26 11:26:28 +03:00
Delyan Angelov
a6576bec1d
json: fix encoding of structs with pointers; add test 2022-09-23 14:07:53 +03:00
Delyan Angelov
09411128af
json.cjson: add a test case for more complex json object construction 2022-09-21 17:22:42 +03:00
yuyi
a758b6686c
json: minor cleanup in json_test.v (#15501) 2022-08-23 07:59:50 +03:00
yuyi
47e75c68a9
cgen: fix json.encode of a struct containing a field of an alias type of another struct (#15490) 2022-08-22 11:04:58 +03:00
Delyan Angelov
857e047d01
json: tag functions that cgen may call internally for json.encode/json.decode, as [markused] 2022-08-02 11:45:41 +03:00
Delyan Angelov
8593408179
json.cjson: add a submodule that allows lower level access to the cJSON library (constructing JSON trees in memory with null leafs). 2022-07-20 23:34:17 +03:00
wilesun
d12a8aef68
json: use C.cJSON_free, for freeing the intermediate result in json_print and json_print_pretty (#15029) 2022-07-13 07:11:18 +03:00
yuyi
de136f6baf
checker: improve pub struct check (fix #14446) (#14777) 2022-06-19 17:42:22 +03:00
yuyi
abf35270cf
checker: fix json decoder with generic struct (#14700) 2022-06-06 19:25:02 +03:00
yuyi
5d429140a4
json: fix json decode with missing map type field (#14678) 2022-06-04 20:27:11 +03:00
Delyan Angelov
8c969efe6b
tests: make json_test.v less noisy, to see errors easier 2022-05-26 15:27:54 +03:00
StunxFS
11bdb04d0c
json: fix struct field default value support (#14304) 2022-05-20 11:22:17 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Alexander Medvednikov
af73e195da net: byte fixes 2022-04-15 15:55:39 +03:00
Alexander Medvednikov
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
yuyi
2d6d6c9ac9
json: fix json decode with sumtype of multi array type (#14035) 2022-04-14 15:36:24 +03:00
yuyi
dc08105022
json: fix error for json decode with sumtype (#14025) 2022-04-13 18:06:28 +03:00
yuyi
617608b23d
cgen: fix optional struct declarations for empty structs (#13970) 2022-04-08 14:51:37 +03:00
yuyi
c9dcdf6744
cgen: fix json decode with optional argument (fix #13943) (#13958) 2022-04-06 19:34:22 +03:00
Delyan Angelov
f5e4d17cf3
json: return errors with more context, on failed json.decode() calls. 2022-04-05 12:06:08 +03:00
Tim Basel
9d0a5942ac
builtin: change IError msg and code to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
Delyan Angelov
9ebd56caa7
cgen,json: bugfix for json.decode; now [skip] fields are initialised 2022-01-22 19:29:38 +02:00