Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/JSON.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ using PrecompileTools, Parsers, StructUtils
import StructUtils: @noarg, @kwarg, @defaults, @tags, @choosetype, @nonstruct, lower, lift
export JSONText, StructUtils, @noarg, @kwarg, @defaults, @tags, @choosetype, @nonstruct, @omit_null, @omit_empty

# Mark documented API as `public` on Julia versions that support it (>= 1.11).
# Wrapped in `eval(Expr(...))` because `public` is a parse error on older versions.
@static if VERSION >= v"1.11"
eval(Expr(:public,
:parse, :parse!, :parsefile, :parsefile!,
:lazy, :lazyfile, :LazyValue,
:isvalidjson,
:json, :print,
:lower, :lift,
:omit_null, :omit_empty,
:Object, :Null, :Omit, :JSONStyle,
))
end

@enum Error InvalidJSON UnexpectedEOF ExpectedOpeningObjectChar ExpectedOpeningQuoteChar ExpectedOpeningArrayChar ExpectedClosingArrayChar ExpectedComma ExpectedColon ExpectedNewline InvalidChar InvalidNumber InvalidUTF16

@noinline function invalid(error, buf, pos::Int, T)
Expand Down
Loading