question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate from JSON.jl to JSON3.jl

See original GitHub issue

@essenciary After you have nicely moved all JSON code in Genie to JSON3, we could think about doing the same for Stipple. Here are my 2 cents to it; define a JSONText equivalent in JSON3.

using JSON3, StructTypes

struct JSONText
    s::String
end

@inline StructTypes.StructType(::Type{JSONText}) = JSON3.RawType()
@inline StructTypes.construct(::Type{JSONText}, x::JSON3.RawValue) = JSONText(string(x))
@inline JSON3.rawbytes(x::JSONText) = x.s

All JSON.lower definitions would then need to be replaced by JSON3.rawbytes() plus the StructType definition, if I got it right.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hhaenselcommented, Dec 8, 2021

It seems that no packages use JSON.lower() yet, so we don’t need the above lines. They would break incremental compilation anyhow 😉 I’ll prepare a PR …

0reactions
essenciarycommented, Dec 8, 2021

Awesome! It was used for sure but we might’ve gotten rid of it. I’ll run some tests with the PR too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Home · JSON3.jl
JSON3 provides two main functions: JSON3.read and JSON3.write . These allow, in the basic case, reading a JSON string into a JSON3.Object or...
Read more >
quinnj/JSON3.jl - GitHub
JSON3.jl. Build Status codecov. Documentation. Stable Dev. Yet another JSON package for Julia; this one ...
Read more >
Home · JSON3.jl - JuliaHub
The JSON format is made up of just a few types: Object, Array, String, Number, Bool, and Null. In the JSON3 package, there...
Read more >
How to modify a JSON object that's been read in? - Data
I have read a JSON using JSON3.jl but after that I can't seem to modify the json. E.g. a = JSON3.read("{\"a\":1}") a[:b] =...
Read more >
JSON3.jl: Yet another JSON Package for Julia - Morioh
In today's post we will learn about JSON3.jl: Yet another JSON package for Julia; this one is for speed and slick struct mapping....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found