private List<SegmentInstance> parseSegments(JsonParser parser) throws JsonParseException, IOException {
        JsonToken current = parser.nextToken();

        assertExpectedJsonToken(current, JsonToken.START_ARRAY, parser.getCurrentLocation());
        List<SegmentInstance> instances = new ArrayList<SegmentInstance>();
        while ((current = parser.nextToken()) != JsonToken.END_ARRAY) {

            assertExpectedJsonToken(current, JsonToken.START_OBJECT, parser.getCurrentLocation());

            String segmentId = getNextTextValue("cid", parser); // get pageId

            current = parser.nextToken(); // move to field: layouts
            assertExpectedFiled(parser.getCurrentName(), "layouts", parser.getCurrentLocation());
            SegmentInstance instance = new SegmentInstance();
            instance.setLayouts(parseLayouts(parser, segmentId));
            instances.add(instance);

            assertExpectedJsonToken((current = parser.nextToken()), JsonToken.END_OBJECT, parser.getCurrentLocation());

        }
        return instances;

    }
@param parser
@throws JsonParseException
@throws IOException
src/test/java/com/alibaba/json/test/performance/JacksonPageModelParser.java