private void readIdToRequest ( CoronaSerializer coronaSerializer ) throws IOException { coronaSerializer . readField ( "idToRequest" ) ; // Expecting the START_OBJECT token for idToRequest coronaSerializer . readStartObjectToken ( "idToRequest" ) ; JsonToken current = coronaSerializer . nextToken ( ) ; while ( current != JsonToken . END_OBJECT ) { Integer id = Integer . parseInt ( coronaSerializer . getFieldName ( ) ) ; idToRequest . put ( id , new ResourceRequestInfo ( coronaSerializer ) ) ; current = coronaSerializer . nextToken ( ) ; } // Done with reading the END_OBJECT token for idToRequest }
Reads the idToRequest map from a JSON stream