Parameters2JSON
Documentation for Parameters2JSON.
Parameters2JSON.export_json
Parameters2JSON.import_json
Parameters2JSON.import_json_and_display
Parameters2JSON.pretty_display
Parameters2JSON.pretty_display
Parameters2JSON.pretty_display
Parameters2JSON.pretty_display
Parameters2JSON.@jsonable
Parameters2JSON.export_json
— Methodexport_json(mystruct, fl; openmode="w")
Writes the @jsonable
struct mystruct
to a file fl
.
Additional Information
- Wrapper around
JSON3.pretty(::IO, mystruct)
.
Parameters2JSON.import_json
— Methodimport_json(fl, ::Type{T})
Reads from a file fl
into a @jsonable
struct of type T
.
Additional Information
- Wrapper around
JSON3.read(::String, T )
.
Parameters2JSON.import_json_and_display
— Methodimport_json_and_display(fl, ::Type{T}, io::IO = stdout)
Reads from a file fl
into a @jsonable
struct of type T
and calls pretty_display
on the result.
Additional Information
- I think I'll destroy this function and merge it into
import_json
as a different method.
Parameters2JSON.pretty_display
— Methodpretty_display(params)
Writes the @jsonable
struct params
to an stdout
.
Additional Information
- Further prettifies a call to
JSON3.pretty(stdout, params)
.
Parameters2JSON.pretty_display
— Methodpretty_display(io::IO, params)
Writes the @jsonable
struct params
to an IO
stream.
Additional Information
- Further prettifies a call to
JSON3.pretty(::IO, params)
.
Parameters2JSON.pretty_display
— Methodpretty_display(str::String, params)
Writes the @jsonable
struct params
to a string str
and returns it.
Additional Information
- Further prettifies a call to
JSON3.pretty(::IO, params)
.
Parameters2JSON.pretty_display
— Methodpretty_display(::Type{String}, params)
Writes the @jsonable
struct params
to a string and returns it.
Additional Information
- Further prettifies a call to
JSON3.pretty(::IO, params)
.
Parameters2JSON.@jsonable
— Macro@jsonable [mutable] struct Foo ... end
Convenience macro allowing JSON import, exports, and displays for structs.
Additional Information
One must have the StructTypes package Pkg.add
ed in order to use any JSON functionality.