public class RDBJSONSupport extends Object
JsopTokenizer support in oak-commons.
The result of parsing uses the simplest possible Java representation of the JSON values (see Section 3 of RFC 7159), thus
null, Boolean.TRUE, Boolean.FALSE, Number
, or String, or
List of representations, or
Map, mapping member names to representations.
The boolean parameter of the constructor ({link
RDBJSONSupport(boolean)) allows changing the default for the maps to
use sorted maps using Revisions as keys, as used internally be the
DocumentNodeStore.
| Constructor and Description |
|---|
RDBJSONSupport(boolean useRevisionMaps) |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendJsonMap(StringBuilder sb,
Map<Object,Object> map) |
static void |
appendJsonMember(StringBuilder sb,
String key,
Object value) |
static void |
appendJsonString(StringBuilder sb,
String s) |
static void |
appendJsonValue(StringBuilder sb,
Object value) |
@Nullable Object |
parse(@NotNull org.apache.jackrabbit.oak.commons.json.JsopTokenizer json)
Parses the supplied JSON.
|
@Nullable Object |
parse(@NotNull String json)
Parses the supplied JSON.
|
public RDBJSONSupport(boolean useRevisionMaps)
useRevisionMaps - whether to use revision maps instead of regular
Maps.@Nullable public @Nullable Object parse(@NotNull @NotNull String json)
@Nullable public @Nullable Object parse(@NotNull @NotNull org.apache.jackrabbit.oak.commons.json.JsopTokenizer json)
public static void appendJsonMember(StringBuilder sb, String key, Object value)
public static void appendJsonString(StringBuilder sb, String s)
public static void appendJsonMap(StringBuilder sb, Map<Object,Object> map)
public static void appendJsonValue(StringBuilder sb, Object value)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.