Parser

object Parser

Utility functions for parsing TBDex Messages and Resources

Functions

Link copied to clipboard
fun parseMessage(payload: String): Message

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.

Link copied to clipboard
fun parseMessageToJsonNode(payload: String): <Error class: unknown class>

Takes an existing Message in the form of a json string and parses it into a JsonNode object. Validates object structure.

Link copied to clipboard

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.

Link copied to clipboard
fun parseResourceToJsonNode(payload: String): <Error class: unknown class>

Takes an existing REsource in the form of a json string and parses it into a JsonNode object. Validates object structure.