src/main/java/com/cedarsoftware/util/io/Resolver.java
protected void rehashMaps()
    {
        final boolean useMapsLocal = useMaps;
        for (Object[] mapPieces : prettyMaps)
        {
            JsonObject jObj = (JsonObject) mapPieces[0];
            Object[] javaKeys, javaValues;
            Map map;

            if (useMapsLocal)
            {   // Make the @keys be the actual keys of the map.
                map = jObj;
                javaKeys = (Object[]) jObj.remove("@keys");
                javaValues = (Object[]) jObj.remove("@items");
            }
            else
            {
                map = (Map) jObj.target;
                javaKeys = (Object[]) mapPieces[1];
                javaValues = (Object[]) mapPieces[2];
                jObj.clear();
            }

            int j = 0;

            while (javaKeys != null && j < javaKeys.length)
            {
                map.put(javaKeys[j], javaValues[j]);
                j++;
            }
        }
    }
protected void rehashMaps()
    {
        final boolean useMapsLocal = useMaps;
        for (Object[] mapPieces : prettyMaps)
        {
            JsonObject jObj = (JsonObject) mapPieces[0];
            Object[] javaKeys, javaValues;
            Map map;

            if (useMapsLocal)
            {   // Make the @keys be the actual keys of the map.
                map = jObj;
                javaKeys = (Object[]) jObj.remove("@keys");
                javaValues = (Object[]) jObj.remove("@items");
            }
            else
            {
                map = (Map) jObj.target;
                javaKeys = (Object[]) mapPieces[1];
                javaValues = (Object[]) mapPieces[2];
                jObj.clear();
            }

            int j = 0;

            while (javaKeys != null && j < javaKeys.length)
            {
                map.put(javaKeys[j], javaValues[j]);
                j++;
            }
        }
    }
protected void rehashMaps ( ) { final boolean useMapsLocal = useMaps ; for ( Object [ ] mapPieces : prettyMaps ) { JsonObject jObj = ( JsonObject ) mapPieces [ 0 ] ; Object [ ] javaKeys , javaValues ; Map map ; if ( useMapsLocal ) { // Make the @keys be the actual keys of the map. map = jObj ; javaKeys = ( Object [ ] ) jObj . remove ( "@keys" ) ; javaValues = ( Object [ ] ) jObj . remove ( "@items" ) ; } else { map = ( Map ) jObj . target ; javaKeys = ( Object [ ] ) mapPieces [ 1 ] ; javaValues = ( Object [ ] ) mapPieces [ 2 ] ; jObj . clear ( ) ; } int j = 0 ; while ( javaKeys != null && j < javaKeys . length ) { map . put ( javaKeys [ j ] , javaValues [ j ] ) ; j ++ ; } } }
Process Maps/Sets (fix up their internal indexing structure)
This is required because Maps hash items using hashCode(), which will
change between VMs.  Rehashing the map fixes this.
<br>
If useMaps==true, then move @keys to keys and @items to values
and then drop these two entries from the map.
<br>
This hashes both Sets and Maps because the JDK sets are implemented
as Maps.  If you have a custom built Set, this would not 'treat' it
and you would need to provider a custom reader for that set.
Process Maps / Sets ( fix up their internal indexing structure ) This is required because Maps hash items using hashCode () which will change between VMs . Rehashing the map fixes this . <br > If useMaps == true then move