Package org.opencms.jsp.jsonpart
Class CmsJsonPart
java.lang.Object
org.opencms.jsp.jsonpart.CmsJsonPart
Helper class used to translate key/value pairs from and to the format which can be processed by the
CmsJsonPartFilter.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final String
Gets the header section for a named JSON part.getKey()
Returns the key.getValue()
Returns the value.static List<CmsJsonPart>
parseJsonParts
(String text) Parses the encoded JSON parts from the given string and puts them in a list.
-
Field Details
-
END
The terminator used for JSON parts.- See Also:
-
-
Constructor Details
-
CmsJsonPart
Creates a new instance.- Parameters:
key
- the keyvalue
- the value
-
-
Method Details
-
getHeader
Gets the header section for a named JSON part.- Parameters:
key
- the JSON key for the part- Returns:
- the header section for the given key
-
parseJsonParts
Parses the encoded JSON parts from the given string and puts them in a list.- Parameters:
text
- the text containing the encoded JSON parts- Returns:
- the decoded JSON parts
-
getKey
Returns the key.- Returns:
- the key
-
getValue
Returns the value.- Returns:
- the value
-