final class IdFragment extends JsonFragment
id fragment resolution class
JSON Schema documents can have id members in any subschema
(there can also be one at the root of the schema,
but this one plays a particular role). This class helps find a subschema
with a given id.
Note that the draft does not specify anywhere that id members
should have unique values in a same schema! This implementation therefore
returns the first schema found with the given id, and you should not
rely on the order in which keys are looked up etc (there is no order
defined in the keys of a JSON Object!).
| Constructor and Description |
|---|
IdFragment(String id) |
| Modifier and Type | Method and Description |
|---|---|
JsonNode |
resolve(JsonNode node)
Resolve this fragment against a given node
|
String |
toString() |
fromFragment, isEmptyprivate final String id
IdFragment(String id)
public JsonNode resolve(JsonNode node)
JsonFragmentresolve in class JsonFragmentnode - the nodeMissingNode if the fragment is not
found)public String toString()
toString in class JsonFragmentCopyright © 2012. All Rights Reserved.