173 Commits

Author SHA1 Message Date
Felipe Pena
57aae3fd20
cgen: fix json decode option alias (fix #24843) (#24853) 2025-07-06 08:22:07 +03:00
Delyan Angelov
30ce22866d docs: put some more dots in the doc comments of public APIs, found by find_doc_comments_with_no_dots.v 2025-07-02 16:12:03 +03:00
Delyan Angelov
91a3844ad5
tools: add support for // vtest vflags: -w in _test.v files, to allow v -W test . later, for files, that have known warnings 2025-06-22 12:43:04 +03:00
kbkpbot
fd79183122
json: link with libm (fix #24272) (#24273) 2025-04-21 17:51:46 +03:00
Delyan Angelov
94a97f6173
tools: implement an -s option for v ast, to skip all nodes with default values like [], {}, 0, false; with it v ast -pts examples/hello_world.v | wc -l is 36 lines 2025-02-05 15:53:56 +02:00
Felipe Pena
5eecd04eee
json: fix default struct field initialization with long array (#23355) 2025-01-03 19:25:21 +02:00
Felipe Pena
17812a77b8
cgen: fix type_default for option type, when the default expr is none (fix #23318) (#23320) 2024-12-30 21:06:42 +02:00
Felipe Pena
8cdb507bed
json: support @[json_null] tag to enforce null, when encoding none option values (#23319) 2024-12-30 20:59:28 +02:00
Felipe Pena
80bae08c9a
cgen,json: fix default initialization of structs with options (#23263) 2024-12-25 19:42:48 +02:00
Felipe Pena
98f13ef491
json: fix codegen for struct default expr (fix #23216) (#23233) 2024-12-23 00:26:55 +02:00
Carlos Esquerdo Bernat
63fff1dcd4
json: use @[required] to disallow parsing nulls (#23218) 2024-12-22 10:12:58 +02:00
Felipe Pena
b0772193f8
vlib: enable more satnitized memleak detection runs without false positives on the CI (#23200) 2024-12-20 16:09:16 +02:00
Felipe Pena
fc8cd58782
json: fix memory leak on result messages (checked with json_option_raw_test.v, compiled with -fsanitize=address,pointer-compare,pointer-subtract) (#23172) 2024-12-15 16:43:43 +02:00
Felipe Pena
0998bb772c
json: add primitive type validation (fix #23021) (#23142) 2024-12-13 08:10:51 +02:00
Felipe Pena
a66c4c9340
json: fix decode codegen for []&type (fix #23007) (#23010) 2024-11-30 08:40:14 +02:00
Delyan Angelov
2ba1271a2e
json: mark json_print_pretty/1 with @[markused] (used by cgen) 2024-11-18 22:39:20 +02:00
Turiiya
8c4de2000b
cgen, json: make errors more informative (resolve empty panics) (related: #21184) (#22898) 2024-11-18 10:59:39 +02:00
Turiiya
3bf459c0d2
checker: fix json.encode_pretty with a struct init expression argument (#22897) 2024-11-18 10:42:34 +02:00
Hitalo Souza
8ebbacecd6
json: move _test.v files to vlib/json/tests/ (#22731) 2024-11-12 20:33:01 +02:00
Felipe Pena
a9e814ff68
cgen: fix ptr field encoding for json (fix #22717) (#22720) 2024-11-01 07:28:37 +02:00
yuyi
79786732ef
all: replace struct field name '@type' with 'type' (#22485) 2024-10-11 08:53:18 +03:00
Felipe Pena
ef72f97b96
json: fix encode/decode of fixed arrays (fix #22369) (#22448) 2024-10-08 19:31:34 +03:00
Felipe Pena
1233858488
json: fix json encode/decode with embed support (#22277) 2024-09-22 07:54:22 +03:00
Felipe Pena
651a116159
json: fix decoding of structs with embeds (#22264) 2024-09-21 09:01:11 +03:00
Felipe Pena
97c9f5f9e4
json: allow passing an anon struct as a decode type (#22228) 2024-09-17 15:33:17 +03:00
yuyi
acf6b344f7
fmt: fix formating a file in an oscillating manner (fix #22223, fix #22026) (#22232) 2024-09-17 09:47:38 +03:00
yuyi
c51d30bf53
fmt: fix alignment of struct init fields (#22025) 2024-08-11 09:11:24 +03:00
yuyi
19f080ffb8
all: change single blank comment to blank line (#22016) 2024-08-09 14:55:58 +03:00
yuyi
ddb6685d8a
fmt: fix and simplify align of struct fields (#21995) 2024-08-05 20:23:39 +03:00
Hitalo Souza
1a17a0716d
json: increase test cases before enabling sumtype decode in all json libraries (#21958) 2024-07-30 03:36:37 +03:00
Turiiya
1363cc85fd
time: update unix time acces, fix issues related to deviating unix times (#21293) 2024-04-17 00:33:37 +03:00
Swastik Baranwal
656009dc62
json: allow i32 decoding and encoding (#21162) 2024-04-02 05:24:36 +03:00
Turiiya
c086bee5be
breaking,vlib: update handling of imports whose symbols are not directly used in imported file, remove pub const is_used = 1 workarounds (#21160) 2024-04-01 22:07:05 +03:00
Turiiya
f77bb32044
all: fix typos (#21089) 2024-03-25 12:18:27 +02:00
Felipe Pena
4f742ad1b2
json: fix decode struct ptr (#20828) 2024-02-15 06:41:10 +02:00
Turiiya
d485cceee8
doc: update trim_doc_node_description, make module readmes more uniform (#20792) 2024-02-12 12:38:47 +02:00
Felipe Pena
df3591ccc2
json: fix struct with option enum field (fix #20597) #20597 2024-01-20 19:54:12 +02:00
Anton
763f94388b
all: update copyright year (#20334) 2024-01-01 23:29:54 +02:00
Felipe Pena
db6ae6ee9b
json: fix option sumtype handling (#20186) 2023-12-19 14:11:32 +02:00
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