{
"Hello": "World",
"" : "This is an empty key",
"some_key": {"": "bad data here", "ok": "I am ok"},
"some_array": [{"": "bad data here", "ok": "I am ok"},{"ok": "I am just ok"}]
}
With fix nothing()
Results in:
{
"Hello" : "World",
"" : "This is an empty key",
"some_key" : {
"some_key" : "bad data here",
"ok" : "I am ok"
},
"some_array" : [ {
"1" : "bad data here",
"ok" : "I am ok"
}, {
"ok" : "I am just ok"
} ]
}
Should be:
{
"Hello" : "World",
"" : "This is an empty key",
"some_key" : {
"" : "bad data here",
"ok" : "I am ok"
},
"some_array" : [ {
"" : "bad data here",
"ok" : "I am ok"
}, {
"ok" : "I am just ok"
} ]
}
https://metafacture.org/playground/?flux=inputFile%0A%7C+open-file%0A%7C+as-records%0A%7C+decode-json%0A%7C+fix%28transformationFile%29%0A%7C+encode-json%28prettyPrinting%3D%22true%22%29%0A%7C+print%0A%3B&transformation=nothing%28%29&data=%7B%0A++++%22Hello%22%3A+%22World%22%2C%0A++++%22%22+%3A+%22This+is+an+empty+key%22%2C%0A++++%22some_key%22%3A+%7B%22%22%3A+%22bad+data+here%22%2C+%22ok%22%3A+%22I+am+ok%22%7D%2C%0A++++%22some_array%22%3A+%5B%7B%22%22%3A+%22bad+data+here%22%2C+%22ok%22%3A+%22I+am+ok%22%7D%2C%7B%22ok%22%3A+%22I+am+just+ok%22%7D%5D%0A%0A%7D
With fix
nothing()
Results in:
Should be: