GitXplorerGitXplorer
q

JSON3.jl

public
222 stars
52 forks
76 issues

Commits

List of commits on branch main.
Verified
7fbc465a39a27663b2ef77d85d03d36072116233

Fix typo in docs (#303)

LLilithHafner committed 8 days ago
Verified
737f6f482a9811bc2f741656c2f13e74831841b0

add `parse` and `parsefile` functions (#302)

JJeffBezanson committed a month ago
Verified
ce90511530d6ee0fddb6998b169e3329fd35b789

Add extra keyword argument for ignoring extra fields (#300)

ssimsurace committed a month ago
Verified
02e2ecf029d4b357b9de1dc80330a3c8f89eb364

Bump version to 1.14.1

qquinnj committed 3 months ago
Verified
5e4717e6c2579776e3ef36a0f1ab598b732d3d14

Remove two inlines slowing down GLTF TTFX and bloating compiled dll size (#282)

jjaakkor2 committed 3 months ago
Verified
4856272072978d877edbb899b2739ffc998facf4

handle lots of fields (#284)

NNaunet committed 3 months ago

README

The README file for this repository.

JSON3.jl

Build Status codecov

Documentation

Stable Dev

Yet another JSON package for Julia; this one is for speed and slick struct mapping

TL;DR

Basic

# builtin reading/writing
JSON3.read(json_string)
JSON3.write(x)

# custom types
JSON3.read(json_string, T; kw...)
JSON3.write(x)

More complicated

# custom types: incrementally update a mutable struct
x = T()
JSON3.read!(json_string, x; kw...)
JSON3.write(x)

# read from file
json_string = read("my.json", String)
JSON3.read(json_string)
JSON3.read(json_string, T; kw...)

# write to file
open("my.json", "w") do f
    JSON3.write(f, x)
    println(f)
end

# write a pretty file
open("my.json", "w") do f
    JSON3.pretty(f, JSON3.write(x))
    println(f)
end

# generate a type from json
using StructTypes
JSON3.@generatetypes json_string_sample
JSON3.read(json_string, JSONTypes.Root)