Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1036574 // parseSimpleValueMap - reverse of Map.toString

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10613L/58K).

static MapSO parseSimpleValueMap(S s) {
  s = uncurly(s);
  new LinkedHashMap<S, O> map;
  for (part : splitAtComma_trim(s)) {
    PairS p = tok_splitAtEquals_pair(part);
    if (p != null) {
      map.put(p.a, parseIntOrDoubleOrKeepObject(p.b));
    }
  }
  ret map;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036574
Snippet name: parseSimpleValueMap - reverse of Map.toString
Eternal ID of this version: #1036574/1
Text MD5: cb73365a8ca126046b4440ee3ae2c5cd
Transpilation MD5: c53b6fdb947386ca133caa94a90cf47f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-03-14 20:58:29
Source code size: 279 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 131 / 190
Referenced in: [show references]