Go to file
Thomas Lamprecht fe8855e032 reader: JsonObject: cope with empty (null) return value
there may be cases where the backend serialization plumping code
makes it easier to return null instead of a emtpy object if a
(sub)property or whole config is not configured, as it's closer to
the truth (not configured == null, configured but empty would be {})

For objects this resulted in a exception, as the null value was tried
to be dereferenced, avoid that by defaulting to an empty object in
that case.
For arrays we already coped with that by luck, make that more
explicit to avoid future breakage.

Both result to a empty array being returned as values, which means
empty store and is deemed to be OK in that case.

The rowdef.required still applies and adds empty values though, this
could be argued to not be really fitting - for now lets keep it that
way, we could make this opt-in though if it shows that it is not
always correct.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-15 16:21:45 +01:00
debian bump version to 2.4-3 2020-11-23 18:46:09 +01:00
src reader: JsonObject: cope with empty (null) return value 2021-01-15 16:21:45 +01:00
Makefile buildsys: improve clean target 2020-11-02 07:41:30 +01:00