Class JsonIndenter
java.lang.Object
edu.internet2.middleware.grouperClient.util.JsonIndenter
indent json, assumes the input is not yet indented. Also, this is only for
testing or logging or documentation purposes, not production
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intfindNextEndTagIndex(String json, int startFrom) find the end tag from json and a start from indexstatic intfindNextStartTagIndex(String json, int startFrom) find the start tag from json and a start from index either look for a quote, {, [ or scalar.static booleaninstantIndent(String json, int index) see if instant indentstatic booleaninstantNewline(String json, int index) see if instant indentstatic booleaninstantUnindent(String json, int index) see if instant unindentstatic booleaninstantUnindentTwoChars(String json, int index) see if instant indentresult()get the resulttoString()
-
Constructor Details
-
JsonIndenter
- Parameters:
theJson- is the json to format indenter
-
-
Method Details
-
result
get the result- Returns:
- the result
-
instantIndent
see if instant indent- Parameters:
json-index-- Returns:
- if it is an instant indent
-
instantNewline
see if instant indent- Parameters:
json-index-- Returns:
- if it is an instant indent
-
instantUnindent
see if instant unindent- Parameters:
json-index-- Returns:
- if it is an instant unindent
-
instantUnindentTwoChars
see if instant indent- Parameters:
json-index-- Returns:
- if it is an instant indent
-
findNextStartTagIndex
find the start tag from json and a start from index either look for a quote, {, [ or scalar. generally not whitespace- Parameters:
json-startFrom-- Returns:
- the start tag index of -1 if not found another
-
findNextEndTagIndex
find the end tag from json and a start from index- Parameters:
json-startFrom- is the char after the start of tag- Returns:
- the start tag index of -1 if not found another
-
toString
-