Module jesse_lib

Json schema validation module.

Description

Json schema validation module.

This module is the core of jesse, it implements the validation functionality according to the standard.

Function Index

empty_if_not_found/1Returns an empty list if the given value is ?not_found.
is_array/1Checks if the given value is json array.
is_json_object/1A naive check if the given data is a json object.
is_null/1Checks if the given value is json null.

Function Details

empty_if_not_found/1

empty_if_not_found(Value::any()) -> any()

Returns an empty list if the given value is ?not_found.

is_array/1

is_array(Value::any()) -> boolean()

Checks if the given value is json array. This check is needed since objects in jsx are lists (proplists).

is_json_object/1

is_json_object(Value::any()) -> boolean()

A naive check if the given data is a json object. Supports two main formats of json representation: 1) mochijson2 format ({struct, proplist()}) 2) jiffy format ({proplist()}) 3) jsx format ([{binary() | atom(), any()}]) Returns true if the given data is an object, otherwise false is returned.

is_null/1

is_null(Value::any()) -> boolean()

Checks if the given value is json null.


Generated by EDoc