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
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
findNextEndTagIndex
(String json, int startFrom) find the end tag from json and a start from indexstatic int
findNextStartTagIndex
(String json, int startFrom) find the start tag from json and a start from index either look for a quote, {, [ or scalar.static boolean
instantIndent
(String json, int index) see if instant indentstatic boolean
instantNewline
(String json, int index) see if instant indentstatic boolean
instantUnindent
(String json, int index) see if instant unindentstatic boolean
instantUnindentTwoChars
(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
-