com.alibaba.fastjson.serializer.SerialContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastjson Show documentation
Show all versions of fastjson Show documentation
Fastjson is a JSON processor (JSON parser + JSON generator) written in Java
The newest version!
package com.alibaba.fastjson.serializer;
import com.alibaba.fastjson2.JSONWriter;
public class SerialContext {
public final SerialContext parent;
public final Object object;
public final Object fieldName;
public final int features;
JSONWriter jsonWriter;
SerialContext(JSONWriter jsonWriter, SerialContext parent, Object object, Object fieldName, int features, int fieldFeatures) {
this.parent = parent;
this.jsonWriter = jsonWriter;
this.object = object;
this.fieldName = fieldName;
this.features = features;
}
public SerialContext(SerialContext parent, Object object, Object fieldName, int features, int fieldFeatures) {
this.parent = parent;
this.object = object;
this.fieldName = fieldName;
this.features = features;
}
/**
* @deprecated
*/
public String getPath() {
return toString();
}
public String toString() {
String path = null;
if (jsonWriter != null) {
path = jsonWriter.getPath();
}
return path;
}
}