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 ref JsonDoc end).>parse("{ \"userName\": \"hello\" }")?
- Debug(jsonDoc.string())
- let userName = (jsonDoc.data as JsonObject).data("userName")? as String
- Debug(userName)
- else
- Debug("error")
- end
Add Comment
Please, Sign In to add comment