View Issue Details

IDProjectCategoryView StatusLast Update
0000039BooBooGeneralpublic2026-01-12 01:11
Reportertremblin Assigned Totremblin  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0000039: add json_exists and _set_array
DescriptionSet_array should allow a mix of strings and numbers. Support quoted strings if not already supported in arrays
TagsNo tags attached.

Activities

tremblin

2026-01-08 18:51

administrator   ~0000020

Checked and need to add support for quoted strings in arrays

tremblin

2026-01-08 19:14

administrator   ~0000021

Quoted strings were supported but it kept the quotes on strings, now it's fixed.

tremblin

2026-01-09 19:51

administrator   ~0000022

Last edited: 2026-01-09 19:51

Not sure there's a way to add sub hashes in arrays with set_array, you can set sub arrays but set_array may not be able to set hashes in arrays

Set array will be like json_set_array json vec where vector can contains strings, numbers or vectors but I don't know how to add hashes into a vector without hacks.

tremblin

2026-01-09 19:56

administrator   ~0000023

It may be possible to split the call into json_add_array and json_add_hash along with json_set_number/string/etc to get fully functional support but that's harder to work with

tremblin

2026-01-09 20:19

administrator   ~0000024

I think I will go with add_array and add_hash for better support. You will have to use indices as names when setting elements of an array and set them sequentially from 0 to n:

json_add_array json "name" "foo>[0]" ; name will be ignored for array elements
json_set_number json "foo>[0]>[0]" 74

Issue History

Date Modified Username Field Change
2026-01-07 02:35 tremblin New Issue
2026-01-07 02:35 tremblin Status new => assigned
2026-01-07 02:35 tremblin Assigned To => tremblin
2026-01-08 18:51 tremblin Note Added: 0000020
2026-01-08 19:14 tremblin Note Added: 0000021
2026-01-09 19:51 tremblin Note Added: 0000022
2026-01-09 19:51 tremblin Note Edited: 0000022
2026-01-09 19:56 tremblin Note Added: 0000023
2026-01-09 20:19 tremblin Note Added: 0000024
2026-01-12 01:11 tremblin Status assigned => resolved
2026-01-12 01:11 tremblin Resolution open => fixed