diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/expected.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/expected.json new file mode 100644 index 00000000..9fb7ecb7 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/expected.json @@ -0,0 +1,6 @@ +{ + "animal_string_Array" : [ "dog" ], + "test" : { + "1" : "dog" + } +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/input.json b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/input.json new file mode 100644 index 00000000..89ce5d8b --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/input.json @@ -0,0 +1,5 @@ +{ + "animal_string_Array" : [ + "dog" + ] +} diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/test.fix b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/test.fix new file mode 100644 index 00000000..44346c94 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/test.fix @@ -0,0 +1 @@ +copy_field("animal_string_Array[]", "test") diff --git a/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/test.flux b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/test.flux new file mode 100644 index 00000000..7c3575fa --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/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/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/todo.txt b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/todo.txt new file mode 100644 index 00000000..c1e768f6 --- /dev/null +++ b/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldArrayOfStringsWithSingleValueAsIndexedRepeatedField/todo.txt @@ -0,0 +1 @@ +See issue #239