a pure-Swift JSON serializer and deserializer