JSONFormat

struct defined in module Pollen


			JSONFormat() <: Format

Format for reading and writing trees from and to JSON.

Trees nodes are encoded as JSON objects:


			julia> render(Node(:p, "Hello", nothing), JSONFormat()) |> println

{"attributes":{},"tag":"p","children":["Hello", null]}

Encoding to JSON is lossless only when leaf and attribute values are valid JSON types. Richer leaf values will be converted to a dictionary of MIME type representations to allow serialization and rich display upon deserialization.

Methods

There are 2 methods for Pollen.JSONFormat:

util.jl:493