public class JsonIndenter extends Object
Constructor and Description |
---|
JsonIndenter(String theJson) |
Modifier and Type | Method and Description |
---|---|
static int |
findNextEndTagIndex(String json,
int startFrom)
find the end tag from json and a start from index
|
static 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 indent
|
static boolean |
instantNewline(String json,
int index)
see if instant indent
|
static boolean |
instantUnindent(String json,
int index)
see if instant unindent
|
static boolean |
instantUnindentTwoChars(String json,
int index)
see if instant indent
|
String |
result()
get the result
|
String |
toString() |
public JsonIndenter(String theJson)
theJson
- is the json to format
indenterpublic String result()
public static boolean instantIndent(String json, int index)
json
- index
- public static boolean instantNewline(String json, int index)
json
- index
- public static boolean instantUnindent(String json, int index)
json
- index
- public static boolean instantUnindentTwoChars(String json, int index)
json
- index
- public static int findNextStartTagIndex(String json, int startFrom)
json
- startFrom
- public static int findNextEndTagIndex(String json, int startFrom)
json
- startFrom
- is the char after the start of tagpublic String toString()
toString
in class Object
Object.toString()
Copyright © 2016 Internet2. All rights reserved.