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 intAGRESSIVE have no effect without PROTECT_KEYS or PROTECT_VALUE AGRESSIVE mode allows Json-smart to not protect String containing special charsstatic final intstatic final intstatic final intfor advanced usage sample see #see net.minidev.json.test.TestCompressorFlagsstatic final intstatic final JSONStylestatic final JSONStylestatic final JSONStyle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStart the first Array elementvoidarrayNextElm(Appendable out) Start a new Array elementvoidarrayObjectEnd(Appendable out) End of an Array elementvoidarrayStart(Appendable out) Array startvoidarrayStop(Appendable out) Array Donevoidescape(String s, Appendable out) booleanbooleanindent()booleanbooleanvoidobjectElmStop(Appendable out) End Of Object elementvoidobjectEndOfKey(Appendable out) end of Key in json ObjectvoidStart the first Object elementvoidobjectNext(Appendable out) Start a new Object elementvoidobjectStart(Appendable out) begin ObjectvoidobjectStop(Appendable out) terminate ObjectbooleanbooleanbooleanvoidwriteString(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
-