public final class JsonUnflattener extends Object
JsonUnflattener provides a static unflatten(String) method
to unflatten any flattened JSON string back to nested one.| Constructor and Description |
|---|
JsonUnflattener(String json)
Creates a JSON unflattener.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
String |
unflatten()
Returns a JSON string of nested objects by the given flattened JSON string.
|
static String |
unflatten(String json)
Returns a JSON string of nested objects by the given flattened JSON string.
|
JsonUnflattener |
withPrintMode(PrintMode printMode)
A fluent setter to setup a print mode of the
JsonUnflattener. |
JsonUnflattener |
withSeparator(char separator)
A fluent setter to setup the separator within a key in the flattened JSON.
|
public JsonUnflattener(String json)
json - the JSON stringpublic JsonUnflattener withSeparator(char separator)
separator - any characterJsonUnflattenerpublic JsonUnflattener withPrintMode(PrintMode printMode)
JsonUnflattener. The
default print mode is minimal.printMode - a PrintModeJsonUnflattenerpublic static String unflatten(String json)
json - a flattened JSON stringpublic String unflatten()
Copyright © 2016. All rights reserved.