
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
UnquotedJson
Advanced tools
UnquotedJson is a JSON5 parser.
unquoted format convert to normal json format:
let x = """{
0:{index:0, license:t, nameSID:n, image:"img:left", descriptionSID:t, category:r}
}"""
let y =
x
|> Json.parse
|> Json.print
UnquotedJson is a superset of JSON, so the JSON.parse parsing function can directly parse normal JSON. follows code convert the normal format to unquoted json format:
let n = """{
"0":{"index":0,"license":"t","nameSID":"n","image":"img:left","descriptionSID":"t","category":"r"}
}"""
let y =
n
|> Json.parse
|> Json.print
You can define serialization and deserialization functions for objects.
let serialize<'t> obj =
obj
|> Json.read<'t>
|> Json.print
let deserialize<'t> text =
text
|> Json.parse
|> Json.write<'t>
Here are some examples of serialization of common object types.
(1,"x")
[1,"x"]
[1;2;3]
[1,2,3]
Supports serialization of anonymous records also.
{ name = "abcdefg"; age = 18 }
{"name":"abcdefg","age":18}
Map [1,"1";2,"2"]
[[1,"1"],[2,"2"]]
[Some 1;None]
[[1],[]]
type UionExample =
| Zero
| OnlyOne of int
| Pair of int * string
[Zero;OnlyOne 1;Pair(2,"b")]
["Zero";["OnlyOne", 1];["Pair",2,"b"]]
The signature of tryRead is:
tryRead:Type -> obj -> ((Type -> obj -> Json) -> Json) option
The signature of tryWrite is:
tryWrite:Type -> Json -> ((Type -> Json -> obj) -> obj) option
The usage see also FSharpConverter.fs
The return value of JSON.parse is Json type that is a Discriminated Union type of F#.
Parse RFC-compliant JSON with extreme parsing speed and minimal memory usage.
Json.Stringlet i = "[\"start\", {\"action\": \"process\", \"data\": [1, 2, 3]}, \"end\"]"
let e = Json.Array
[ Json.String "start"
Json.Object
[ "action", Json.String "process"
"data", Json.Array [ Json.Number 1.0; Json.Number 2.0; Json.Number 3.0 ] ]
Json.String "end" ]
let y = RfcJson.parse i
Should.equal e y
UnquotedJson can be used for query strings in URLs. When the field is of primitive type, the query string format is used. When the field is a complex type, use the Unqoted Json format.
The source see UrlQuery
The usage see also UrlQueryTest.fs
The main structure types are defined as follows:
FAQs
A JSON parser.
We found that unquotedjson demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.