Example JSON
Ivo-Balbaert opened this issue · comments
ibalbaert commented
result = String.build do |io|
io.json_object do |object|
object.field "address", "Crystal Road 1234"
object.field "location" do
io.json_array do |array|
array << 12.3
array << 34.5
end
end
end
end
Error: undefined method json_object for String::Builder
Oliver Vartiainen commented
This doesn't seem to relevant anymore as the original example has been changed:
crystal-by-example/json/json.cr
Lines 13 to 23 in aab909a