Decodes a Base64 (URL safe)-encoded String then validates it as correct JSON.
Converts a JSON string into a Validation[String, JsonNode]
Converts a JSON string into a Validation[String, JsonNode]
The name of the field containing JSON
The JSON string to parse
a Scalaz Validation, wrapping either an error String or the extracted JsonNode
Validates a String as correct JSON.
Strips the instance information from a Jackson parsing exception message:
Strips the instance information from a Jackson parsing exception message:
"... at [Source: java.io.StringReader@1fe7a8f8; line: 1, column: 2]"" ^^^^^^^^
Also removes any control characters and replaces tabs with 4 spaces.
The exception message which needs tidying up
the same exception message, but with instance information etc removed. Option-boxed because the message can be null
Converts an incoming key, value into a json4s JValue.
Converts an incoming key, value into a json4s JValue. Uses the lists of keys which should contain bools, ints and dates to apply specific processing to those values when found.
The key of the field to generate. Also used to determine what additional processing should be applied to the value
The value of the field
A List of keys whose values should be processed as boolean-like Strings
A List of keys whose values should be processed as integer-like Strings
a JField, containing the original key and the processed String, now as a JValue
Reformats a non-standard date-time into a format compatible with JSON Schema's date-time format validation.
Reformats a non-standard date-time into a format compatible with JSON Schema's date-time format validation. If the String does not match the expected date format, then return the original String.
The date-time-like String to reformat to pass JSON Schema validation
the reformatted date-time String if possible, or otherwise the original String
Converts a JSON string into a JsonNode.
Converts a JSON string into a JsonNode.
UNSAFE - only use it for Strings you have created yourself. Use extractJson for all external Strings.
The JSON string to parse
the extracted JsonNode
Contains general purpose extractors and other utilities for JSONs. Jackson-based.