Skip to content

Instantly share code, notes, and snippets.

@LectomT
Created October 27, 2013 08:34
Show Gist options
  • Save LectomT/7179201 to your computer and use it in GitHub Desktop.
Save LectomT/7179201 to your computer and use it in GitHub Desktop.
Devon 2013 대안언어 축제 Quiz.io 문제는: https://gist.github.com/dahlia/e7ebd78da2ce363af308
Number json := method(self asString)
true json := method(self asString)
false json := method(self asString)
nil json := method("null")
Sequence json := method("\"" .. self asMutable replaceSeq("\\", "\\\\") replaceSeq("\"", "\\\"") .. "\"")
List json := method("[" .. self map(a, a json) join(",") .. "]")
Map json := method(
"{" .. self map(k, v, k json .. ":" .. v json) join(",") .. "}"
)
@LectomT
Copy link
Author

LectomT commented Oct 27, 2013

고생하신 유은총님 및 신원미상 (죄송합니다. 성함을 모르겠...)님께 감사드리며.

이스케이프 예외설정은 뭔가 더 필요할것 같지만 일단 패스... -0-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment