summaryrefslogtreecommitdiff
path: root/python/python.go
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2019-08-01 23:35:08 +0900
committer Jooyung Han <jooyung@google.com> 2019-08-02 00:08:05 +0900
commit04329f131ad3d8d274a6af20784e6110c88db981 (patch)
tree044f847a5c31b52f69eecec3ae1a41b2dc258a3c /python/python.go
parente16330393ac53154f75740d0280c7f0c28d86fe1 (diff)
Add jsonmodify tool
This tool is used to modify apex_manifest.json when building apex module. Here's the usage: usage: jsonmodify [-h] [-o output] [-v path value] [-s path value] [-r path] [-a path [value ...]] [input] positional arguments: input JSON file optional arguments: -h, --help show this help message and exit -o output, --out output write result to a file. If omitted, print to stdout -v path value, --value path value set value of the key specified by path. If path doesn't exist, creates new one. -s path value, --replace path value replace value of the key specified by path. If path doesn't exist, no op. -r path, --remove path remove the key specified by path. If path doesn't exist, no op. -a path [value ...], --append_list path [value ...] append values to the list specified by path. If path doesn't exist, creates new list for it. Bug: 138695532 Test: m jsonmodify Test: echo {} | jsonmodify -v name hello -a list.nested a b c { "name": "hello", "list": { "nested": [ "a", "b", "c" ] } } Change-Id: I2cd043c614b3ad2306a0c27ccee302633c6d2525
Diffstat (limited to 'python/python.go')
0 files changed, 0 insertions, 0 deletions