public void serializeValues( JsonWriter writer, M values, JsonSerializationContext ctx, JsonSerializerParameters params ) {
        if ( !values.isEmpty() ) {
            Map<K, V> map = values;
            if ( ctx.isOrderMapEntriesByKeys() && !(values instanceof SortedMap<?, ?>) ) {
                map = new TreeMap<K, V>( map );
            }

            if ( ctx.isWriteNullMapValues() ) {

                for ( Entry<K, V> entry : map.entrySet() ) {
                    String name = keySerializer.serialize( entry.getKey(), ctx );
                    if ( keySerializer.mustBeEscaped( ctx ) ) {
                        writer.name( name );
                    } else {
                        writer.unescapeName( name );
                    }
                    valueSerializer.serialize( writer, entry.getValue(), ctx, params, true );
                }

            } else {

                for ( Entry<K, V> entry : map.entrySet() ) {
                    if ( null != entry.getValue() ) {
                        String name = keySerializer.serialize( entry.getKey(), ctx );
                        if ( keySerializer.mustBeEscaped( ctx ) ) {
                            writer.name( name );
                        } else {
                            writer.unescapeName( name );
                        }
                        valueSerializer.serialize( writer, entry.getValue(), ctx, params, true );
                    }
                }

            }
        }
    }
public void serializeValues ( JsonWriter writer , M values , JsonSerializationContext ctx , JsonSerializerParameters params ) { if ( ! values . isEmpty ( ) ) { Map < K , V > map = values ; if ( ctx . isOrderMapEntriesByKeys ( ) && ! ( values instanceof SortedMap < ? , ? > ) ) { map = new TreeMap < K , V > ( map ) ; } if ( ctx . isWriteNullMapValues ( ) ) { for ( Entry < K , V > entry : map . entrySet ( ) ) { String name = keySerializer . serialize ( entry . getKey ( ) , ctx ) ; if ( keySerializer . mustBeEscaped ( ctx ) ) { writer . name ( name ) ; } else { writer . unescapeName ( name ) ; } valueSerializer . serialize ( writer , entry . getValue ( ) , ctx , params , true ) ; } } else { for ( Entry < K , V > entry : map . entrySet ( ) ) { if ( null != entry . getValue ( ) ) { String name = keySerializer . serialize ( entry . getKey ( ) , ctx ) ; if ( keySerializer . mustBeEscaped ( ctx ) ) { writer . name ( name ) ; } else { writer . unescapeName ( name ) ; } valueSerializer . serialize ( writer , entry . getValue ( ) , ctx , params , true ) ; } } } } }
<p>serializeValues</p>

@param writer a {@link com.github.nmorel.gwtjackson.client.stream.JsonWriter} object.
@param values a M object.
@param ctx a {@link com.github.nmorel.gwtjackson.client.JsonSerializationContext} object.
@param params a {@link com.github.nmorel.gwtjackson.client.JsonSerializerParameters} object.