diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/expected.json new file mode 100644 index 00000000..3791064c --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/expected.json @@ -0,0 +1,4 @@ +{ + "key" : [ ], + "words" : [ "value", "more_value", "even_more_value" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/input.json new file mode 100644 index 00000000..5cf962f7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/input.json @@ -0,0 +1,4 @@ +{ + "key" : [ "value", "more_value", "even_more_value" ], + "words" : [ ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.fix new file mode 100644 index 00000000..b0b9e3c7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.fix @@ -0,0 +1 @@ +move_field("key[].*", "words[].$append") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/move_fieldFromArrayOfStringsWithAsterisk/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") +; diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json new file mode 100644 index 00000000..3784e98d --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/expected.json @@ -0,0 +1,3 @@ +{ + "key" : [ "value", "m__re_value", "even_m__re_value" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json new file mode 100644 index 00000000..160261df --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/input.json @@ -0,0 +1,3 @@ +{ + "key" : [ "value", "more_value", "even_more_value" ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix new file mode 100644 index 00000000..0f50b7d8 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.fix @@ -0,0 +1 @@ +replace_all("test[].*", "o", "__") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/replace_AllFromArrayOfStringsWithAsterisk/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") +;