diff --git a/data/testing/moveToNewOwnSubfield/animalsStrings.json b/data/testing/moveToNewOwnSubfield/animalsStrings.json new file mode 100644 index 0000000..0d2d2be --- /dev/null +++ b/data/testing/moveToNewOwnSubfield/animalsStrings.json @@ -0,0 +1,3 @@ +{ + "fictional": "unicorn" +} \ No newline at end of file diff --git a/data/testing/moveToNewOwnSubfield/expected_string.json b/data/testing/moveToNewOwnSubfield/expected_string.json new file mode 100644 index 0000000..152a5e8 --- /dev/null +++ b/data/testing/moveToNewOwnSubfield/expected_string.json @@ -0,0 +1,5 @@ +{ + "fictional": { + "animal": "unicorn" + } +} \ No newline at end of file diff --git a/data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.fix b/data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.fix new file mode 100644 index 0000000..b896366 --- /dev/null +++ b/data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.fix @@ -0,0 +1 @@ +move_field("fictional", "fictional.animal") \ No newline at end of file diff --git a/data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.flux b/data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.flux new file mode 100644 index 0000000..28c5a63 --- /dev/null +++ b/data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.flux @@ -0,0 +1,10 @@ +infile = FLUX_DIR + "animalsStrings.json"; + +infile +| open-file +| as-records +| decode-json +| fix(FLUX_DIR + "moveToNewOwnSubfield.fix") +| encode-json(prettyPrinting="true") +| write(FLUX_DIR + "result_string.json") +; \ No newline at end of file diff --git a/data/testing/moveToNewOwnSubfield/result_string.json b/data/testing/moveToNewOwnSubfield/result_string.json new file mode 100644 index 0000000..e69de29