The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
library(jsonStrings)
<- jsonString$new("
jstring {
\"foo\": \"hello\",
\"bar\": {\"x\": 1, \"y\": 2},
\"baz\": [9, 99, null],
\"qux\": [null, [0, 1], {\"a\": 1000}]
}
")
$at("foo")
jstring## "hello"
$at("bar", "y")
jstring## 2
$at("baz", 2)
jstring## null
$erase("baz")
jstring
jstring## {
## "bar": {
## "x": 1,
## "y": 2
## },
## "foo": "hello",
## "qux": [
## null,
## [
## 0,
## 1
## ],
## {
## "a": 1000
## }
## ]
## }
$hasKey("bar")
jstring## [1] TRUE
$is("object")
jstring## [1] TRUE
$addProperty("new", "[4,5]")
jstring
jstring## {
## "bar": {
## "x": 1,
## "y": 2
## },
## "foo": "hello",
## "new": [
## 4,
## 5
## ],
## "qux": [
## null,
## [
## 0,
## 1
## ],
## {
## "a": 1000
## }
## ]
## }
$update(
jstring"{
\"foo\": \"goodbye\",
\"quux\": 10000
}"
)
jstring## {
## "bar": {
## "x": 1,
## "y": 2
## },
## "foo": "goodbye",
## "new": [
## 4,
## 5
## ],
## "quux": 10000,
## "qux": [
## null,
## [
## 0,
## 1
## ],
## {
## "a": 1000
## }
## ]
## }
<- "[
jspatch {\"op\": \"remove\", \"path\": \"/foo\"},
{\"op\": \"replace\", \"path\": \"/qux/2\", \"value\": 9999}
]"
$patch(jspatch)
jstring## {
## "bar": {
## "x": 1,
## "y": 2
## },
## "new": [
## 4,
## 5
## ],
## "quux": 10000,
## "qux": [
## null,
## [
## 0,
## 1
## ],
## 9999
## ]
## }
<- jsonString$new("
jstring {
\"foo\": \"hello\",
\"bar\": {\"x\": 1, \"y\": 2},
\"baz\": [9, 99, null],
\"qux\": [null, [0, 1], {\"a\": 1000}]
}
")
$erase("baz")$addProperty("new", "[4,5]")$update(
jstring"{
\"foo\": \"goodbye\",
\"quux\": 10000
}"
)
jstring## {
## "bar": {
## "x": 1,
## "y": 2
## },
## "foo": "goodbye",
## "new": [
## 4,
## 5
## ],
## "quux": 10000,
## "qux": [
## null,
## [
## 0,
## 1
## ],
## {
## "a": 1000
## }
## ]
## }
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.