public abstract class JsonProperties extends Object
Avro type | JSON type | Java type |
null |
null |
NULL_VALUE |
boolean |
Boolean | boolean |
int |
Number | int |
long |
Number | long |
float |
Number | float |
double |
Number | double |
bytes |
String | byte[] |
string |
String | String |
record |
Object | Map |
enum |
String | String |
array |
Array | Collection |
map |
Object | Map |
fixed |
String | byte[] |
Json
Modifier and Type | Class and Description |
---|---|
static class |
JsonProperties.Null |
Modifier and Type | Field and Description |
---|---|
static JsonProperties.Null |
NULL_VALUE
A value representing a JSON
null . |
Modifier and Type | Method and Description |
---|---|
void |
addAllProps(JsonProperties properties)
Adds all the props from the specified json properties.
|
void |
addProp(String name,
Object value) |
void |
addProp(String name,
String value)
Adds a property with the given name name and value value.
|
Object |
getObjectProp(String name)
Returns the value of the named property in this schema.
|
Map<String,Object> |
getObjectProps()
Return the defined properties as an unmodifiable Map.
|
String |
getProp(String name)
Returns the value of the named, string-valued property in this schema.
|
boolean |
hasProps() |
void |
putAll(JsonProperties np) |
public static final JsonProperties.Null NULL_VALUE
null
.public String getProp(String name)
public Object getObjectProp(String name)
public void addProp(String name, String value)
name
- The name of the property to addvalue
- The value for the property to addpublic void putAll(JsonProperties np)
public void addAllProps(JsonProperties properties)
getObjectProps()
public Map<String,Object> getObjectProps()
public boolean hasProps()
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.