type-parser icon indicating copy to clipboard operation
type-parser copied to clipboard

I would like the possibility to escape separators if they exist in the 'value':

Open Elisedlund opened this issue 11 years ago • 1 comments

I would like the possibility to escape separators if they exist in the 'value':
Examples:

map = (Map<String, String>) parser.parseType("hello1=1\\,23,hello2=321", type);
List<String> list = parser.parse("a\\,b,c", new GenericType<List<String>>() {});

Elisedlund avatar Apr 15 '14 14:04 Elisedlund

It's partly possible today by providing your own SplitterStrategy. But would be nicer if there was a escaping strategy out of the box. Does anyone have or know where to find a good algorithm for this? I'm sure there are plenty of libraries already doing this. However It feels like it could be a library of its own (promoting modularity).

drapostolos avatar Apr 24 '14 15:04 drapostolos