Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.json.JsonUtils Class Reference
Collaboration diagram for dev.rafex.ether.json.JsonUtils:

Static Public Member Functions

static JsonNode at (final JsonNode node, final String pointer)
static JsonCodec codec ()
static JsonCodec codec (final JsonCodecBuilder builder)
static< T > T fromJson (final byte[] input, final Class< T > clazz)
static< T > T fromJson (final byte[] input, final JavaType type)
static< T > T fromJson (final byte[] input, final TypeReference< T > typeRef)
static< T > T fromJson (final InputStream input, final Class< T > clazz)
static< T > T fromJson (final InputStream input, final JavaType type)
static< T > T fromJson (final InputStream input, final TypeReference< T > typeRef)
static< T > T fromJson (final String json, final Class< T > clazz)
static< T > T fromJson (final String json, final JavaType type)
static< T > T fromJson (final String json, final TypeReference< T > typeRef)
static< T > List< T > fromJsonToList (final String json, final Class< T > elementClass)
static JsonNode parseTree (final byte[] input)
static JsonNode parseTree (final InputStream input)
static JsonNode parseTree (final String json)
static JsonNode readTreeFromFile (final Path path)
static String toJson (final Object value)
static byte[] toJsonBytes (final Object value)
static String toPrettyJson (final Object value)
static< T > T treeToValue (final JsonNode node, final Class< T > clazz)
static< T > T treeToValue (final JsonNode node, final TypeReference< T > typeRef)
static JsonNode valueToTree (final Object value)
static void writeJson (final OutputStream output, final Object value)

Detailed Description

Definition at line 40 of file JsonUtils.java.

Member Function Documentation

◆ at()

JsonNode dev.rafex.ether.json.JsonUtils.at ( final JsonNode node,
final String pointer )
static

Definition at line 128 of file JsonUtils.java.

◆ codec() [1/2]

JsonCodec dev.rafex.ether.json.JsonUtils.codec ( )
static

Definition at line 140 of file JsonUtils.java.

◆ codec() [2/2]

JsonCodec dev.rafex.ether.json.JsonUtils.codec ( final JsonCodecBuilder builder)
static

Definition at line 144 of file JsonUtils.java.

References dev.rafex.ether.json.JsonCodecBuilder.build().

Here is the call graph for this function:

◆ fromJson() [1/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final byte[] input,
final Class< T > clazz )
static

Definition at line 87 of file JsonUtils.java.

◆ fromJson() [2/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final byte[] input,
final JavaType type )
static

Definition at line 95 of file JsonUtils.java.

◆ fromJson() [3/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final byte[] input,
final TypeReference< T > typeRef )
static

Definition at line 91 of file JsonUtils.java.

◆ fromJson() [4/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final InputStream input,
final Class< T > clazz )
static

Definition at line 75 of file JsonUtils.java.

◆ fromJson() [5/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final InputStream input,
final JavaType type )
static

Definition at line 83 of file JsonUtils.java.

◆ fromJson() [6/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final InputStream input,
final TypeReference< T > typeRef )
static

Definition at line 79 of file JsonUtils.java.

◆ fromJson() [7/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final String json,
final Class< T > clazz )
static

Definition at line 63 of file JsonUtils.java.

Referenced by dev.rafex.ether.json.JsonSchemaUtils.parseAndValidateOrThrow().

Here is the caller graph for this function:

◆ fromJson() [8/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final String json,
final JavaType type )
static

Definition at line 71 of file JsonUtils.java.

◆ fromJson() [9/9]

static< T > T dev.rafex.ether.json.JsonUtils.fromJson ( final String json,
final TypeReference< T > typeRef )
static

Definition at line 67 of file JsonUtils.java.

◆ fromJsonToList()

static< T > List< T > dev.rafex.ether.json.JsonUtils.fromJsonToList ( final String json,
final Class< T > elementClass )
static

Definition at line 99 of file JsonUtils.java.

◆ parseTree() [1/3]

JsonNode dev.rafex.ether.json.JsonUtils.parseTree ( final byte[] input)
static

Definition at line 112 of file JsonUtils.java.

◆ parseTree() [2/3]

JsonNode dev.rafex.ether.json.JsonUtils.parseTree ( final InputStream input)
static

Definition at line 108 of file JsonUtils.java.

◆ parseTree() [3/3]

JsonNode dev.rafex.ether.json.JsonUtils.parseTree ( final String json)
static

Definition at line 104 of file JsonUtils.java.

Referenced by dev.rafex.ether.json.JsonSchemaUtils.validate(), and dev.rafex.ether.json.JsonSchemaUtils.validateOrThrow().

Here is the caller graph for this function:

◆ readTreeFromFile()

JsonNode dev.rafex.ether.json.JsonUtils.readTreeFromFile ( final Path path)
static

Definition at line 116 of file JsonUtils.java.

◆ toJson()

String dev.rafex.ether.json.JsonUtils.toJson ( final Object value)
static

Definition at line 47 of file JsonUtils.java.

◆ toJsonBytes()

byte[] dev.rafex.ether.json.JsonUtils.toJsonBytes ( final Object value)
static

Definition at line 55 of file JsonUtils.java.

◆ toPrettyJson()

String dev.rafex.ether.json.JsonUtils.toPrettyJson ( final Object value)
static

Definition at line 51 of file JsonUtils.java.

◆ treeToValue() [1/2]

static< T > T dev.rafex.ether.json.JsonUtils.treeToValue ( final JsonNode node,
final Class< T > clazz )
static

Definition at line 132 of file JsonUtils.java.

◆ treeToValue() [2/2]

static< T > T dev.rafex.ether.json.JsonUtils.treeToValue ( final JsonNode node,
final TypeReference< T > typeRef )
static

Definition at line 136 of file JsonUtils.java.

◆ valueToTree()

JsonNode dev.rafex.ether.json.JsonUtils.valueToTree ( final Object value)
static

Definition at line 124 of file JsonUtils.java.

◆ writeJson()

void dev.rafex.ether.json.JsonUtils.writeJson ( final OutputStream output,
final Object value )
static

Definition at line 59 of file JsonUtils.java.


The documentation for this class was generated from the following file:
  • ether-json/ether-json/src/main/java/dev/rafex/ether/json/JsonUtils.java