diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/disabled.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/disabled.txt new file mode 100644 index 00000000..1b5e6dca --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/disabled.txt @@ -0,0 +1 @@ +See issue #122 diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/expected.json new file mode 100644 index 00000000..ffe5820e --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/expected.json @@ -0,0 +1,3 @@ +{ + "animals" : [ "ant", "dog", "cat", "fish", "zebra", "horse", "hippo", "giraffe" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/input.json new file mode 100644 index 00000000..c12e2dd0 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/input.json @@ -0,0 +1,3 @@ +{ + "animals" : [ [ "ant", "dog" ], "cat", [ "fish", [ "zebra", "horse" ], "hippo" ], "giraffe" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/test.fix new file mode 100644 index 00000000..c51d0620 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/test.fix @@ -0,0 +1,2 @@ +append("animals[].2.type", " is big") +append("animals_2[].*.type", " is cool") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/flatten/test.flux @@ -0,0 +1,8 @@ +FLUX_DIR + "input.json" +|open-file +|as-records +|decode-json +|fix(FLUX_DIR + "test.fix") +|encode-json(prettyPrinting="true") +|write(FLUX_DIR + "output-metafix.json") +;