@Test public void producesMissingNodeForMalformedJsonString() { final JsonNode node = ToggleJsonNode.fromString("not a json string"); assertThat(node.isMissingNode()).isTrue(); }
public static JsonNode fromString(String json) { try { return DEFAULT_OBJECT_READER.readTree(json); } catch (IOException err) { return MissingNode.getInstance(); } }
ToggleJsonNode { public static JsonNode fromString(String json) { try { return DEFAULT_OBJECT_READER.readTree(json); } catch (IOException err) { return MissingNode.getInstance(); } } }
ToggleJsonNode { public static JsonNode fromString(String json) { try { return DEFAULT_OBJECT_READER.readTree(json); } catch (IOException err) { return MissingNode.getInstance(); } }  }
ToggleJsonNode { public static JsonNode fromString(String json) { try { return DEFAULT_OBJECT_READER.readTree(json); } catch (IOException err) { return MissingNode.getInstance(); } }  static JsonNode fromString(String json); static JsonNode findByKey(Iterator<JsonNode> iterator, String key); static boolean matchesCohort(JsonNode node, Optional<String> cohortOpt); static JsonNode findByCohort(JsonNode node, Optional<String> cohortOpt); }
ToggleJsonNode { public static JsonNode fromString(String json) { try { return DEFAULT_OBJECT_READER.readTree(json); } catch (IOException err) { return MissingNode.getInstance(); } }  static JsonNode fromString(String json); static JsonNode findByKey(Iterator<JsonNode> iterator, String key); static boolean matchesCohort(JsonNode node, Optional<String> cohortOpt); static JsonNode findByCohort(JsonNode node, Optional<String> cohortOpt); static final ObjectReader DEFAULT_OBJECT_READER; }