Package net.minidev.json
Class JSONStyle
java.lang.Object
net.minidev.json.JSONStyle
JSONStyle object configure JSonSerializer reducing output size
- Author:
- Uriel Chemouni <[email protected]>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
AGRESSIVE have no effect without PROTECT_KEYS or PROTECT_VALUE AGRESSIVE mode allows Json-smart to not protect String containing special charsstatic final int
static final int
static final int
for advanced usage sample see #see net.minidev.json.test.TestCompressorFlagsstatic final int
static final JSONStyle
static final JSONStyle
static final JSONStyle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Start the first Array elementvoid
arrayNextElm
(Appendable out) Start a new Array elementvoid
arrayObjectEnd
(Appendable out) End of an Array elementvoid
arrayStart
(Appendable out) Array startvoid
arrayStop
(Appendable out) Array Donevoid
escape
(String s, Appendable out) boolean
boolean
indent()
boolean
boolean
void
objectElmStop
(Appendable out) End Of Object elementvoid
objectEndOfKey
(Appendable out) end of Key in json Objectvoid
Start the first Object elementvoid
objectNext
(Appendable out) Start a new Object elementvoid
objectStart
(Appendable out) begin Objectvoid
objectStop
(Appendable out) terminate Objectboolean
boolean
boolean
void
writeString
(Appendable out, String value)
-
Field Details
-
FLAG_PROTECT_KEYS
public static final int FLAG_PROTECT_KEYSfor advanced usage sample see #see net.minidev.json.test.TestCompressorFlags- See Also:
-
FLAG_PROTECT_4WEB
public static final int FLAG_PROTECT_4WEB- See Also:
-
FLAG_PROTECT_VALUES
public static final int FLAG_PROTECT_VALUES- See Also:
-
FLAG_AGRESSIVE
public static final int FLAG_AGRESSIVEAGRESSIVE have no effect without PROTECT_KEYS or PROTECT_VALUE AGRESSIVE mode allows Json-smart to not protect String containing special chars- See Also:
-
FLAG_IGNORE_NULL
public static final int FLAG_IGNORE_NULL- Since:
- 2.1
- See Also:
-
NO_COMPRESS
-
MAX_COMPRESS
-
LT_COMPRESS
- Since:
- 1.0.9.1
-
-
Constructor Details
-
JSONStyle
public JSONStyle(int FLAG) -
JSONStyle
public JSONStyle()
-
-
Method Details
-
protectKeys
public boolean protectKeys() -
protectValues
public boolean protectValues() -
protect4Web
public boolean protect4Web() -
ignoreNull
public boolean ignoreNull() -
indent
public boolean indent() -
mustProtectKey
-
mustProtectValue
-
writeString
- Throws:
IOException
-
escape
-
objectStart
begin Object- Throws:
IOException
-
objectStop
terminate Object- Throws:
IOException
-
objectFirstStart
Start the first Object element- Throws:
IOException
-
objectNext
Start a new Object element- Throws:
IOException
-
objectElmStop
End Of Object element- Throws:
IOException
-
objectEndOfKey
end of Key in json Object- Throws:
IOException
-
arrayStart
Array start- Throws:
IOException
-
arrayStop
Array Done- Throws:
IOException
-
arrayfirstObject
Start the first Array element- Throws:
IOException
-
arrayNextElm
Start a new Array element- Throws:
IOException
-
arrayObjectEnd
End of an Array element- Throws:
IOException
-