Add --force-empty-vectors option (#5653)

The rationale for this option is that JSON clients typically want empty arrays (i.e [] in the JSON) instead of missing properties, but not empty strings when the value isn't set.
--force-empty is kept as-is, i.e. it will force both empty strings and vectors.

Closes #5652
This commit is contained in:
cryptocode
2019-12-06 02:33:45 +01:00
committed by Wouter van Oortmerssen
parent d7530ae961
commit a8e800bd7c
4 changed files with 102 additions and 89 deletions

View File

@@ -203,5 +203,8 @@ Additional options:
- `--force-empty` : When serializing from object API representation, force
strings and vectors to empty rather than null.
- `--force-empty-vectors` : When serializing from object API representation, force
vectors to empty rather than null.
NOTE: short-form options for generators are deprecated, use the long form
whenever possible.