Package io.zerocopy.json.schema.pointer
Class JsonPointerUtils
- java.lang.Object
-
- io.zerocopy.json.schema.pointer.JsonPointerUtils
-
public class JsonPointerUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringescapePointerSegment(java.lang.String pointerSegment)static voidimplode(java.lang.Appendable pointerOut, java.util.List<java.lang.String> path)static voidimplode(java.lang.StringBuilder pointerOut, java.util.List<java.lang.String> path)static java.lang.Stringimplode(java.util.List<java.lang.String> path)static com.fasterxml.jackson.databind.JsonNoderesolvePointer(com.fasterxml.jackson.databind.JsonNode node, java.lang.String jsonPointer)static com.fasterxml.jackson.databind.JsonNoderesolvePointerPath(java.util.List<java.lang.String> pathOut, com.fasterxml.jackson.databind.JsonNode node, java.lang.String jsonPointer)static java.util.List<java.lang.String>split(java.lang.String jsonPointer)static voidsplit(java.util.List<java.lang.String> pathOut, java.lang.String jsonPointer)static java.lang.StringunescapePointerSegment(java.lang.String pointerSegment)
-
-
-
Method Detail
-
resolvePointer
public static com.fasterxml.jackson.databind.JsonNode resolvePointer(com.fasterxml.jackson.databind.JsonNode node, java.lang.String jsonPointer)- Parameters:
node- the node from which to resolve the specified pointerjsonPointer- a JSON pointer according to https://tools.ietf.org/html/rfc6901- Returns:
- the resolved node, or
null, if not found.
-
resolvePointerPath
public static com.fasterxml.jackson.databind.JsonNode resolvePointerPath(java.util.List<java.lang.String> pathOut, com.fasterxml.jackson.databind.JsonNode node, java.lang.String jsonPointer)- Parameters:
pathOut- path output listnode- the node from which to resolve the specified pointerjsonPointer- a JSON pointer according to https://tools.ietf.org/html/rfc6901- Returns:
- the resolved node, or
null, if not found.
-
split
public static void split(java.util.List<java.lang.String> pathOut, java.lang.String jsonPointer)- Parameters:
pathOut- resulting decoded path elementsjsonPointer- a JSON pointer according to https://tools.ietf.org/html/rfc6901
-
split
public static java.util.List<java.lang.String> split(java.lang.String jsonPointer)
- Returns:
- a JSON path with decoded elements
-
implode
public static void implode(java.lang.Appendable pointerOut, java.util.List<java.lang.String> path) throws java.io.IOException- Parameters:
pointerOut- resulting JSON pointerpath- a JSON path with decoded elements- Throws:
java.io.IOException
-
implode
public static void implode(java.lang.StringBuilder pointerOut, java.util.List<java.lang.String> path)- Parameters:
pointerOut- resulting JSON pointerpath- a JSON path with decoded elements
-
implode
public static java.lang.String implode(java.util.List<java.lang.String> path)
- Parameters:
path- a JSON path with decoded elements- Returns:
- JSON pointer
-
unescapePointerSegment
public static java.lang.String unescapePointerSegment(java.lang.String pointerSegment)
-
escapePointerSegment
public static java.lang.String escapePointerSegment(java.lang.String pointerSegment)
-
-