|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.unboundid.scim.marshal.json.JsonParser
public class JsonParser
Helper class for JSON unmarshalling.
| Constructor Summary | |
|---|---|
JsonParser()
|
|
| Method Summary | ||
|---|---|---|
protected SCIMAttribute |
create(AttributeDescriptor descriptor,
Object jsonAttribute)
Create a SCIM attribute from its JSON object representation. |
|
protected SCIMAttributeValue |
createComplexAttribute(org.json.JSONObject jsonAttribute,
AttributeDescriptor attributeDescriptor)
Parse a complex attribute from its representation as a JSON Object. |
|
protected SCIMAttribute |
createMutiValuedAttribute(org.json.JSONArray jsonAttribute,
AttributeDescriptor attributeDescriptor)
Parse a multi-valued attribute from its representation as a JSON Object. |
|
protected SCIMAttribute |
createSimpleAttribute(Object jsonAttribute,
AttributeDescriptor attributeDescriptor)
Parse a simple attribute from its representation as a JSON Object. |
|
protected
|
unmarshal(org.json.JSONObject jsonObject,
ResourceDescriptor resourceDescriptor,
ResourceFactory<R> resourceFactory,
org.json.JSONArray defaultSchemas)
Read a SCIM resource from the specified JSON object. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonParser()
| Method Detail |
|---|
protected <R extends BaseResource> R unmarshal(org.json.JSONObject jsonObject,
ResourceDescriptor resourceDescriptor,
ResourceFactory<R> resourceFactory,
org.json.JSONArray defaultSchemas)
throws org.json.JSONException,
InvalidResourceException
R - The type of resource instance.jsonObject - The JSON object to be read.resourceDescriptor - The descriptor of the SCIM resource to be read.resourceFactory - The resource factory to use to create the resource
instance.defaultSchemas - The set of schemas used by attributes of the
resource, or null if the schemas must be
provided in the resource object.
org.json.JSONException - If an error occurred.
InvalidResourceException - if a schema error occurs.
protected SCIMAttribute createSimpleAttribute(Object jsonAttribute,
AttributeDescriptor attributeDescriptor)
jsonAttribute - The JSON object representing the attribute.attributeDescriptor - The attribute descriptor.
protected SCIMAttribute createMutiValuedAttribute(org.json.JSONArray jsonAttribute,
AttributeDescriptor attributeDescriptor)
throws org.json.JSONException,
InvalidResourceException
jsonAttribute - The JSON object representing the attribute.attributeDescriptor - The attribute descriptor.
org.json.JSONException - Thrown if error creating multi-valued attribute.
InvalidResourceException - if a schema error occurs.
protected SCIMAttributeValue createComplexAttribute(org.json.JSONObject jsonAttribute,
AttributeDescriptor attributeDescriptor)
throws org.json.JSONException,
InvalidResourceException
jsonAttribute - The JSON object representing the attribute.attributeDescriptor - The attribute descriptor.
org.json.JSONException - Thrown if error creating complex attribute.
InvalidResourceException - if a schema error occurs.
protected SCIMAttribute create(AttributeDescriptor descriptor,
Object jsonAttribute)
throws org.json.JSONException,
InvalidResourceException
descriptor - The attribute descriptor.jsonAttribute - The JSON object representing the attribute.
org.json.JSONException - If the JSON object is not valid.
InvalidResourceException - If a schema error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||