Created
November 10, 2011 12:36
-
-
Save mattgu74/1354762 to your computer and use it in GitHub Desktop.
test json opa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Test Json in opa | |
@author Matthieu Guffroy | |
*/ | |
int_json : RPC.Json.json = {Int = 2} | |
float_json : RPC.Json.json = {Float = 2.0} | |
string_json : RPC.Json.json = {String = "test"} | |
bool_json : RPC.Json.json = {Bool = true} | |
list_json : RPC.Json.json = {List = [int_json, float_json, string_json, bool_json]} | |
record_json : RPC.Json.json = {Record = [("int", int_json), ("float", float_json), ("list", list_json)]} | |
do jlog("test serialize") | |
do jlog(Json.serialize(record_json)) | |
do jlog("") | |
do jlog("test serialize_to_js") | |
do jlog(Json.serialize_to_js(record_json)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment