Provide a list of postscripts for your JSON. You can also add / modify according to your needs.
Go 1.21.7
or newer. You may be able to use different versions, but please watch out for compatibility.
- Determine your postscripts in
postscripts/init.go
- If you need a different custom, you may create a new one under
postscripts/
then do step (1). It's possible to execute multiple postscripts. - Run the service with
make run
- Provide the input in
files/input.json
- See the output in
files/output.json
. The output is automatically generated every time you save your input infiles/input.json
Input
{
"ori": {
"id": 1,
"word": "a",
"code": false,
"score": 0.1
},
"json_string": "{\"id\":2,\"word\":\"b\",\"code\":true,\"score\":0.2}",
"json_strings": [
{"json_string": "{\"id\":3,\"word\":\"c\",\"code\":false,\"score\":0.3}"},
{"json_string": "{\"id\":4,\"word\":\"d\",\"code\":true,\"score\":0.4}"}
]
}
Output
{
"json_string": {
"code": true,
"id": 2,
"score": 0.2,
"word": "b"
},
"json_strings": [
{
"json_string": {
"code": false,
"id": 3,
"score": 0.3,
"word": "c"
}
},
{
"json_string": {
"code": true,
"id": 4,
"score": 0.4,
"word": "d"
}
}
],
"ori": {
"code": false,
"id": 1,
"score": 0.1,
"word": "a"
}
}