Package | Description |
---|---|
com.sdicons.json.mapper |
Mapping Java domain classes to the JSON domain so that the generated JSON is nice and clean.
|
com.sdicons.json.mapper.helper |
All the specialized mappers that know how to map instances of a specific class.
|
com.sdicons.json.model |
The JSON model.
|
com.sdicons.json.parser |
Reading files, streams and Strings containing JSON text.
|
com.sdicons.json.validator |
Validating a JSON model with validation rules.
|
com.sdicons.json.validator.predicates |
The building blocks to create validation expressions.
|
Modifier and Type | Method and Description |
---|---|
JSONValue |
JSONMapper.toJSON(Object pojo)
Map a POJO to the JSON representation.
|
Modifier and Type | Method and Description |
---|---|
Object |
JSONMapper.toJava(JSONValue json)
Map a JSON representation to a Java object.
|
Object |
JSONMapper.toJava(JSONValue aValue,
Class<?> aPojoClass)
Map a JSON representation to a Java object.
|
Object |
JSONMapper.toJava(JSONValue json,
ParameterizedType genericType)
Map a JSON representation to a Java object.
|
Modifier and Type | Method and Description |
---|---|
JSONValue |
ShortMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
ObjectMapperProps.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
ObjectMapperMeta.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
ObjectMapperFields.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
MapMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
LongMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
IntegerMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
FloatMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
DoubleMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
DateMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
ComplexClassMapper.toJSON(JSONMapper mapper,
Object pojo) |
JSONValue |
CollectionMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
ClassMapper.toJSON(JSONMapper mapper,
Object pojo)
Map a Java instance to an instance of the JSON model.
|
JSONValue |
ByteMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
BooleanMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
BigIntegerMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
BigDecimalMapper.toJSON(JSONMapper mapper,
Object aPojo) |
JSONValue |
ArrayMapper.toJSON(JSONMapper mapper,
Object aObj) |
JSONValue |
AbstractMapper.toJSON(JSONMapper mapper,
Object aPojo) |
Modifier and Type | Method and Description |
---|---|
Object |
StringMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
ShortMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
ObjectMapperProps.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
ObjectMapperMeta.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
ObjectMapperFields.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
MapMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
LongMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
IntegerMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
FloatMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
EnumMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
DoubleMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
DateMapper.toJava(JSONMapper mapper,
JSONValue jsonVal,
Class<?> aRequestedClass) |
Object |
CollectionMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
ClassMapper.toJava(JSONMapper mapper,
JSONValue json,
Class<?> requestedClass)
Map an instance from the JSON model to Java.
|
Object |
CharacterMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
ByteMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
BooleanMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
BigIntegerMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
BigDecimalMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
ArrayMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRequestedClass) |
Object |
MapMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRawClass,
Type[] aTypes) |
Object |
ComplexClassMapper.toJava(JSONMapper mapper,
JSONValue json,
Class<?> requestedClass,
Type[] types) |
Object |
CollectionMapper.toJava(JSONMapper mapper,
JSONValue aValue,
Class<?> aRawClass,
Type[] aTypes) |
Modifier and Type | Class and Description |
---|---|
class |
JSONArray
Represents a JSON array (list), an ordered list of values ...
|
class |
JSONBoolean
Represents a JSON boolean value.
|
class |
JSONComplex
Superclass of JSON complex types, namely
JSONArray and JSONObject . |
class |
JSONDecimal
Represents a JSON float.
|
class |
JSONInteger
Represents a JSON int.
|
class |
JSONNull
Represents a JSON null value.
|
class |
JSONNumber
The parent class of numerical types, being
JSONInteger and JSONDecimal . |
class |
JSONObject
Representation of a JSON object, a collection (unordered) of name/value pairs.
|
class |
JSONSimple
|
class |
JSONString
Represents a JSON delimited string.
|
Modifier and Type | Method and Description |
---|---|
static JSONValue |
JSONValue.decorate(Object anObject)
This method is the reverse of a strip, it converts a construction of Java objects to a JSON decorated
composition.
|
JSONValue |
JSONArray.get(int i)
Utility method, get an element at a specific position in the list.
|
JSONValue |
JSONObject.get(String aKey)
Utility method, get the element with specified name without having to
retrieve the map first using getValue().
|
Modifier and Type | Method and Description |
---|---|
HashMap<String,JSONValue> |
JSONObject.getValue() |
List<JSONValue> |
JSONArray.getValue() |
Modifier and Type | Method and Description |
---|---|
void |
JSONObject.put(String key,
JSONValue value) |
Constructor and Description |
---|
JSONArray(Collection<JSONValue> contents) |
Modifier and Type | Method and Description |
---|---|
JSONValue |
JSONParser.nextValue()
Read the next JSON structure from the stream and convert it into a
Java model.
|
protected JSONValue |
JSONParser.parseJson(StringBuilder parsed) |
Modifier and Type | Method and Description |
---|---|
static Validator |
ValidatorUtil.buildValidator(JSONValue aVal) |
static Validator |
ValidatorUtil.buildValidator(JSONValue aVal,
HashMap<String,Validator> aRuleset) |
Validator |
ValidatorBuilder.enumeration(JSONValue... values)
Create an anonymous
Enumeration validation rule. |
Validator |
ValidatorBuilder.enumeration(String ruleName,
JSONValue... values)
Create a named
Enumeration validation rule. |
static Switch.SwitchCase |
ValidatorBuilder.switchcase(Validator rule,
JSONValue... values)
Create a
Switch.SwitchCase that can be used to build a Switch validator. |
void |
Validator.validate(JSONValue aValue)
Validate a JSONValue.
|
void |
JSONValidator.validate(JSONValue aValue)
Validate a JSON value according to the rules described in the
validator rules.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Switch.SwitchCase.isApplicable(JSONValue aVal) |
void |
True.validate(JSONValue aValue) |
void |
Switch.validate(JSONValue aValue) |
void |
Str.validate(JSONValue aValue) |
void |
Simple.validate(JSONValue aValue) |
void |
Regexp.validate(JSONValue aValue) |
void |
Ref.validate(JSONValue aValue) |
void |
Range.validate(JSONValue aValue) |
void |
Properties.validate(JSONValue aValue) |
void |
Or.validate(JSONValue aValue) |
void |
Object.validate(JSONValue aValue) |
void |
Null.validate(JSONValue aValue) |
void |
Nr.validate(JSONValue aValue) |
void |
Not.validate(JSONValue aValue) |
void |
Let.validate(JSONValue aValue) |
void |
Length.validate(JSONValue aValue) |
void |
Int.validate(JSONValue aValue) |
void |
False.validate(JSONValue aValue) |
void |
Enumeration.validate(JSONValue aValue) |
void |
Decimal.validate(JSONValue aValue) |
void |
CustomPredicate.validate(JSONValue aValue) |
void |
Content.validate(JSONValue aValue) |
void |
Complex.validate(JSONValue aValue) |
void |
Bool.validate(JSONValue aValue) |
void |
Array.validate(JSONValue aValue) |
void |
And.validate(JSONValue aValue)
Execute the And predicate.
|
Constructor and Description |
---|
Enumeration(String aName,
JSONValue... values) |
Switch.SwitchCase(JSONValue when,
Validator validator) |
Constructor and Description |
---|
Switch.SwitchCase(List<JSONValue> when,
Validator validator) |
Copyright © 2012. All Rights Reserved.