Class JsonOperationNormalizer


  • public class JsonOperationNormalizer
    extends Object
    Normalizes the content of JSONObject to make it comparable.
    Author:
    svante.schubertATgmail.com
    • Constructor Detail

      • JsonOperationNormalizer

        public JsonOperationNormalizer()
    • Method Detail

      • asString

        public static String asString​(org.json.JSONObject jsonObject,
                                      Boolean isTest)
        Make a JSON text of this JSONObject. For compactness, no whitespace is added. If this would not result in a syntactically correct JSON text, then null will be returned instead.

        Warning: This method assumes that the data structure is acyclical.

        Returns:
        a printable, displayable, portable, transmittable representation of the object, beginning with { (left brace) and ending with }  (right brace).
      • asString

        public static String asString​(org.json.JSONObject jsonObject)
        Make a JSON text of this JSONObject.For compactness, no whitespace is added. If this would not result in a syntactically correct JSON text, then null will be returned instead.

        Warning: This method assumes that the data structure is acyclical.

        Parameters:
        jsonObject - the jsonObject to be normalized, with an operation for each line.
        Returns:
        a printable, displayable, portable, transmittable representation of the object, beginning with { (left brace) and ending with }  (right brace).