Serializing to JSON in SML/NJ