Search in sources :

Example 1 with StartObject

use of com.alibaba.fastjson.JSONStreamContext.StartObject in project uavstack by uavorg.

the class JSONReader method readObject.

public Object readObject() {
    if (context == null) {
        return parser.parse();
    }
    readBefore();
    Object object;
    switch(context.getState()) {
        case StartObject:
        case PropertyValue:
            object = parser.parseKey();
            break;
        default:
            object = parser.parse();
            break;
    }
    readAfter();
    return object;
}
Also used : StartObject(com.alibaba.fastjson.JSONStreamContext.StartObject)

Example 2 with StartObject

use of com.alibaba.fastjson.JSONStreamContext.StartObject in project fastjson by alibaba.

the class JSONReader method readObject.

public Object readObject() {
    if (context == null) {
        return parser.parse();
    }
    readBefore();
    Object object;
    switch(context.state) {
        case StartObject:
        case PropertyValue:
            object = parser.parseKey();
            break;
        default:
            object = parser.parse();
            break;
    }
    readAfter();
    return object;
}
Also used : StartObject(com.alibaba.fastjson.JSONStreamContext.StartObject)

Aggregations

StartObject (com.alibaba.fastjson.JSONStreamContext.StartObject)2