Code Room
Code reviewHard
Question
Review this Java code that reads a Snowflake-style 64-bit ID out of an inbound JSON payload with Jackson's tree model.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
ObjectMapper mapper = new ObjectMapper(); long parseId(String json) throws Exception { JsonNode root = mapper.readTree(json); // json is like {"id": 1541815603606036480} double v = root.get("id").asDouble(); return (long) v;}Run or narrate your approach, then ask the coach.