diff --git a/vlib/x/json2/README.md b/vlib/x/json2/README.md index af03be0935..e5f3bf0091 100644 --- a/vlib/x/json2/README.md +++ b/vlib/x/json2/README.md @@ -10,10 +10,10 @@ import net.http fn main() { // Decoding - resp := http.get('https://example.com')? + resp := http.get('https://example.com')! // raw decode - raw_person := json2.raw_decode(resp.body)? + raw_person := json2.raw_decode(resp.body)! // Casting `Any` type / Navigating person := raw_person.as_map() @@ -90,8 +90,8 @@ fn (p Person) to_json() string { } fn main() { - resp := os.read_file('./person.json')? - person := json2.decode(resp)? + resp := os.read_file('./person.json')! + person := json2.decode(resp)! println(person) // Person{name: 'Bob', age: 28, pets: ['Floof']} person_json := json2.encode(person) println(person_json) // {"name": "Bob", "age": 28, "pets": ["Floof"]}