Skip to content

Integrate JSON schema files #31

@fireproofsocks

Description

@fireproofsocks

See http://json-schema.org/examples.html

  • type defs (post_types)
  • field defs
  • metabox defs
  • CCTM exported defs
  • settings def (?)

Example Encoding

try {
    $string = $encoder->encode($data, '/path/to/schema.json');
} catch (ValidationFailedException $e) {
    // data did not match schema 
}

Example Decoding

try {
    $data = $decoder->decodeFile('/path/to/file.json', '/path/to/schema.json');
} catch (ValidationFailedException $e) {
    // data did not match schema 
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions