remove _ in names
This commit is contained in:
parent
829db87c40
commit
3af7344581
1270 changed files with 0 additions and 18916 deletions
|
|
@ -1,25 +0,0 @@
|
|||
package main
|
||||
|
||||
import "encoding/json"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var data interface{}
|
||||
err := json.Unmarshal([]byte(`{"foo":1, "bar":[10, "apples"]}`), &data)
|
||||
if err == nil {
|
||||
fmt.Println(data)
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
sample := map[string]interface{}{
|
||||
"blue": []interface{}{1, 2},
|
||||
"ocean": "water",
|
||||
}
|
||||
json_string, err := json.Marshal(sample)
|
||||
if err == nil {
|
||||
fmt.Println(string(json_string))
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
var data = JSON.parse('{ "foo": 1, "bar": [10, "apples"] }');
|
||||
|
||||
var sample = { "blue": [1,2], "ocean": "water" };
|
||||
var json_string = JSON.stringify(sample);
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
>>> import json
|
||||
>>> data = json.loads('{ "foo": 1, "bar": [10, "apples"] }')
|
||||
>>> sample = { "blue": [1,2], "ocean": "water" }
|
||||
>>> json_string = json.dumps(sample)
|
||||
>>> json_string
|
||||
'{"blue": [1, 2], "ocean": "water"}'
|
||||
>>> sample
|
||||
{'blue': [1, 2], 'ocean': 'water'}
|
||||
>>> data
|
||||
{'foo': 1, 'bar': [10, 'apples']}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
library(rjson)
|
||||
data <- fromJSON('{ "foo": 1, "bar": [10, "apples"] }')
|
||||
data
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package require json
|
||||
set sample {{ "foo": 1, "bar": [10, "apples"] }}
|
||||
|
||||
set parsed [json::json2dict $sample]
|
||||
puts $parsed
|
||||
Loading…
Add table
Add a link
Reference in a new issue