public class MapSerializer
extends java.lang.Object
Format example: [key: "value", "complex key": 'another value', key3: null]
| Constructor and Description |
|---|
MapSerializer() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.String> |
fromString(java.lang.String s)
Convenience wrapper that parses a Groovy-style map string into a LinkedHashMap.
|
static int |
parseMap(java.lang.CharSequence s,
int startPos,
java.util.function.BiConsumer<java.lang.String,java.lang.String> consumer)
The actual parser.
|
static java.lang.String |
toString(java.util.Map<?,?> map)
Serializes a map to a Groovy-style string.
|
public static java.lang.String toString(java.util.Map<?,?> map)
Example: [key: 'value', 'complex key': 'another value', key3: null]
public static java.util.Map<java.lang.String,java.lang.String> fromString(java.lang.String s)
public static int parseMap(java.lang.CharSequence s,
int startPos,
java.util.function.BiConsumer<java.lang.String,java.lang.String> consumer)
Iterates through a CharSequence starting at startPos, extracting key-value pairs and feeding them to the provided BiConsumer.
Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.