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