Object Parser
-
- All Implemented Interfaces:
public class ParserUtility functions for parsing TBDex Messages and Resources
-
-
Method Summary
Modifier and Type Method Description final MessageparseMessage(String payload)Takes an existing Message in the form of a json string and parses it into a Message object. final JsonNodeparseMessageToJsonNode(String payload)Takes an existing Message in the form of a json string and parses it into a JsonNode object. final ResourceparseResource(String payload)Takes an existing Resource in the form of a json string and parses it into a Resource object. final JsonNodeparseResourceToJsonNode(String payload)Takes an existing REsource in the form of a json string and parses it into a JsonNode object. -
-
Method Detail
-
parseMessage
final Message parseMessage(String payload)
Takes an existing Message in the form of a json string and parses it into a Message object. Validates object structure and performs an integrity check using the message signature.
- Parameters:
payload- The message as a json string.- Returns:
The json string parsed into a concrete Message implementation.
-
parseMessageToJsonNode
final JsonNode parseMessageToJsonNode(String payload)
Takes an existing Message in the form of a json string and parses it into a JsonNode object. Validates object structure.
- Parameters:
payload- The message as a json string.- Returns:
The json string parsed into a JsonNode object.
-
parseResource
final Resource parseResource(String payload)
Takes an existing Resource in the form of a json string and parses it into a Resource object. Validates object structure and performs an integrity check using the resource signature.
- Parameters:
payload- The resource as a json string.- Returns:
The json string parsed into a concrete Resource implementation.
-
parseResourceToJsonNode
final JsonNode parseResourceToJsonNode(String payload)
Takes an existing REsource in the form of a json string and parses it into a JsonNode object. Validates object structure.
- Parameters:
payload- The resource as a json string.- Returns:
The json string parsed into a JsonNode object.
-
-
-
-