Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use "debug"
- use "json"
- actor Main
- new create(env: Env) =>
- try
- let jsonDoc = recover val JsonDoc.>parse("{ \"userName\": \"hello\" }")? end
- Debug(jsonDoc.string())
- let userName = (jsonDoc.data as JsonObject val).data("userName")? as String
- Debug(userName)
- else
- Debug("error")
- end
Add Comment
Please, Sign In to add comment