File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -438,5 +438,47 @@ public void contentOperations() {
438438 assertTrue ("7. inner array size 2" , jsonArray .length () == 2 );
439439 assertTrue ("7. inner array item 0" , "val1" .equals (jsonArray .get (0 )));
440440 assertTrue ("7. inner array item 1" , "" .equals (jsonArray .get (1 )));
441- }
441+
442+ /**
443+ * Confirm behavior of original issue
444+ */
445+ String jsonStr =
446+ "{" +
447+ "\" Profile\" : {" +
448+ "\" list\" : {" +
449+ "\" history\" : {" +
450+ "\" entries\" : [" +
451+ "{" +
452+ "\" deviceId\" : \" id\" ," +
453+ "\" content\" : {" +
454+ "\" material\" : [" +
455+ "{" +
456+ "\" stuff\" : false" +
457+ "}" +
458+ "]" +
459+ "}" +
460+ "}" +
461+ "]" +
462+ "}" +
463+ "}" +
464+ "}" +
465+ "}" ;
466+ jsonObject = new JSONObject (jsonStr );
467+ xmlStr = XML .toString (jsonObject );
468+ /**
469+ * This is the created XML. Looks like content was mistaken for
470+ * complex (child node + text) XML.
471+ * <Profile>
472+ * <list>
473+ * <history>
474+ * <entries>
475+ * <deviceId>id</deviceId>
476+ * {"material":[{"stuff":false}]}
477+ * </entries>
478+ * </history>
479+ * </list>
480+ * </Profile>
481+ */
482+ assertTrue ("nothing to test here, see comment on created XML, above" , true );
483+ }
442484}
You can’t perform that action at this time.
0 commit comments