@@ -0,0 +1,1537 @@
+package au.org.ands.vocabs.toolkit.db;%0A%0Aimport com.fasterxml.jackson.databind.JsonNode;%0Aimport com.fasterxml.jackson.databind.node.ArrayNode;%0Aimport com.fasterxml.jackson.databind.node.ObjectNode;%0A%0A/** Test of parsing JSON. */%0Apublic final class TestJsonParsing %7B%0A%0A    /** Private constructor for test class. */%0A    private TestJsonParsing() %7B%0A    %7D%0A%0A    /** Main program.%0A     * @param args Command-line arguments.%0A     */%0A    public static void main(final String%5B%5D args) %7B%0A      String jsonString =%0A              %22%5B%7B%5C%22type%5C%22: %5C%22HARVEST%5C%22,%5C%22provider_type%5C%22:%22%0A              + %22 %5C%22PoolParty%5C%22,%5C%22project_id%5C%22:%22%0A              + %22 %5C%221DCE1494-A022-0001-FFBD-12DE19E01FEB%5C%22%7D,%22%0A              + %22%7B%5C%22type%5C%22: %5C%22TRANSFORM%5C%22%7D,%7B%5C%22type%5C%22: %5C%22IMPORT%5C%22%7D%5D%22;%0A      JsonNode root = TasksUtils.jsonStringToTree(jsonString);%0A      if (root == null) %7B%0A          System.out.println(%22Got null.%22);%0A      %7D else %7B%0A          System.out.println(%22Got instance of:%22 + root.getClass().toString());%0A          if (!(root instanceof ArrayNode)) %7B%0A              System.out.println(%22Didn't get an array.%22);%0A          %7D else %7B%0A              for (JsonNode node : (ArrayNode) root) %7B%0A                  System.out.println(%22Got element: %22 + node.toString());%0A                  if (!(node instanceof ObjectNode)) %7B%0A                      System.out.println(%22Didn't get an object.%22);%0A                  %7D else %7B%0A                      System.out.println(%22task type: %22%0A                              + node.get(%22type%22));%0A                  %7D%0A              %7D%0A          %7D%0A      %7D%0A    %7D%0A%0A%7D%0A

Add test of JSON parsing