Skip to content

Create a lazy builder for JSON[Vision] #4

Open
@rajatkb

Description

@rajatkb

he current builder returns a JSON by creating the entire structure. Useful for smaller documents not so much for large docs i.e 100+mb with 1 million+ nested json entries. A lazy builder would not resolve the entire strcuture but only the top level strcuture. Parsing will be done in a on demand fashion.

The api should look like this

val m = JSON.parsStream(streamsource)
 
 val m1 = m("key1")("key2")( f=> { // do something with this to be happening // return jsonValue})
 
 val m2 = m("key3")(0)(f => { // do something here // return jsonValue})
 
 JSON.toStream(m) // non blocking
 
 val obj:JsonObject = JSON.fromStreamJson(m2)
 
 JSON.toFile(m,"filename") // blocking

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions