How do you transform/encode a generic s-exp to JSON and back?
inb4 "very carefully."
Name:
Anonymous2012-11-10 9:16
>>8
Any Lisp/Scheme; I'm asking generally. JSON hash objects can be decoded as lists in server side lisp. But what datatype in Lisp do I use to represent JSON hash objects? I'm asking this in the context of a function implementation:
(define (to-json exp) ...)
How would the above function then know when to treat an s-exp as a JSON array or hash?