public Attributes readDataset(Attributes attrs) {
        boolean wrappedInArray = next() == Event.START_ARRAY;
        if (wrappedInArray) next();
        expect(Event.START_OBJECT);
        if (attrs == null) {
            attrs = new Attributes();
        }
        fmi = null;
        next();
        doReadDataset(attrs);
        if (wrappedInArray) next();
        return attrs;
    }
@Test
    public void test() {
        StringReader reader = new StringReader(JSON);
        JsonParser parser = Json.createParser(reader);
        Attributes dataset = new JSONReader(parser).readDataset(null);
        assertArrayEquals(IS, dataset.getStrings(Tag.SelectorISValue));
        assertArrayEquals(DS, dataset.getStrings(Tag.SelectorDSValue));
        assertInfinityAndNaN(dataset.getDoubles(Tag.SelectorFDValue));
        assertInfinityAndNaN(dataset.getFloats(Tag.SelectorFLValue));
        assertArrayEquals(INTS, dataset.getInts(Tag.SelectorULValue));
        assertArrayEquals(UINTS, dataset.getInts(Tag.SelectorUSValue));
        assertArrayEquals(INTS, dataset.getInts(Tag.SelectorSLValue));
        assertArrayEquals(INTS, dataset.getInts(Tag.SelectorSLValue));
        assertArrayEquals(LONGS, dataset.getLongs(Tag.SelectorSVValue));
        assertArrayEquals(LONGS, dataset.getLongs(Tag.SelectorUVValue));
    }