All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jsoniter.output.ReflectionEnumEncoder Maven / Gradle / Ivy

Go to download

jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go

There is a newer version: 0.9.23
Show newest version
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