com.jsoniter.output.ReflectionEnumEncoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsoniter Show documentation
Show all versions of jsoniter Show documentation
jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go
package com.jsoniter.output;
import com.jsoniter.any.Any;
import com.jsoniter.spi.Encoder;
import java.io.IOException;
class ReflectionEnumEncoder implements Encoder.ReflectionEncoder {
public ReflectionEnumEncoder(Class clazz) {
}
@Override
public void encode(Object obj, JsonStream stream) throws IOException {
stream.write('"');
stream.writeRaw(obj.toString());
stream.write('"');
}
@Override
public Any wrap(Object obj) {
return Any.wrap(obj.toString());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy