MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / readJson

Method readJson

CodenameOne/src/com/codename1/security/Jwt.java:362–369  ·  view source on GitHub ↗
(byte[] data)

Source from the content-addressed store, hash-verified

360 }
361
362 private static Map<String, Object> readJson(byte[] data) {
363 try {
364 JSONParser parser = new JSONParser();
365 return parser.parseJSON(new InputStreamReader(new ByteArrayInputStream(data), "UTF-8"));
366 } catch (Exception e) {
367 throw new CryptoException("invalid JSON in JWT", e);
368 }
369 }
370
371 // ----------------------------------------------------------------
372 // ECDSA signatures: platform sign() returns ASN.1 DER (SEQUENCE { r, s }),

Callers 1

parseMethod · 0.95

Calls 1

parseJSONMethod · 0.95

Tested by

no test coverage detected