134 Commits

Author SHA1 Message Date
shove
51aaf3c49f
checker: fix incorrect checks when struct fields are ref and option type(fix #19555) (#20195) 2023-12-16 20:45:54 +02:00
Coachonko
0cb5c23861
json: add comment about the role of the @[omitempty] field tag (#20122) 2023-12-08 13:37:38 +02:00
Delyan Angelov
f7b9e4eafd
vfmt: automate transition from the old [attribute] to the new @[attribute] syntax (#19912) 2023-11-17 17:43:29 +02:00
Kim Shrier
722fe40a2f
json: replaced deprecated type byte with u8 (#19905) 2023-11-17 10:47:41 +02:00
Joe C
757929392e
all: update attributes to use new syntax 2023-11-15 16:16:01 +11:00
Felipe Pena
e1312d053a
json: fix recursive pointer encoding (#19840) 2023-11-12 03:00:23 +03:00
JalonSolov
01022e918e
flag,json,net: handle C calls in .v files (part of enabling -W impure-v as default) (#19779) 2023-11-06 14:27:00 +02:00
Delyan Angelov
57a7db11bf
json: fix comment (MyTitle -> ETitle) (#19719) 2023-10-31 18:41:21 +02:00
Delyan Angelov
d350a6846a
docs: document [json: ETitle] in vlib/json/README.md too 2023-10-31 15:59:02 +02:00
Turiiya
1e578b1144
checker: extend byte deprecation warnings to return types (#19668) 2023-10-29 14:25:15 +02:00
Turiiya
6437d82ee1
checker: warn about byte deprecation, when used as a fn parameter (#19629) 2023-10-23 20:54:28 +03:00
felixmaker
2ce209dac5
json: update the example in the module's README.md (#19544) 2023-10-10 20:26:55 +03:00
yuyi
55ca8d8d8e
fmt: align the custom values of the enum fields (#19331) 2023-09-12 14:44:38 +03:00
Turiiya
1e38cc0986
checker: disallow module name duplicates in local names (#18118) 2023-09-08 23:33:35 +03:00
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