{"record":{"id":"67281938f4a50de0","repo":"airbnb/lottie-android","slug":"unknown-point-starts-with","errorCode":null,"errorMessage":"Unknown point starts with {}","messagePattern":"Unknown point starts with (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"lottie/src/main/java/com/airbnb/lottie/parser/JsonUtils.java","lineNumber":55,"sourceCode":"    while (reader.peek() == JsonReader.Token.BEGIN_ARRAY) {\n      reader.beginArray();\n      points.add(jsonToPoint(reader, scale));\n      reader.endArray();\n    }\n    reader.endArray();\n    return points;\n  }\n\n  static PointF jsonToPoint(JsonReader reader, float scale) throws IOException {\n    switch (reader.peek()) {\n      case NUMBER:\n        return jsonNumbersToPoint(reader, scale);\n      case BEGIN_ARRAY:\n        return jsonArrayToPoint(reader, scale);\n      case BEGIN_OBJECT:\n        return jsonObjectToPoint(reader, scale);\n      default:\n        throw new IllegalArgumentException(\"Unknown point starts with \" + reader.peek());\n    }\n  }\n\n  private static PointF jsonNumbersToPoint(JsonReader reader, float scale) throws IOException {\n    float x = (float) reader.nextDouble();\n    float y = (float) reader.nextDouble();\n    while (reader.hasNext()) {\n      reader.skipValue();\n    }\n    return new PointF(x * scale, y * scale);\n  }\n\n  private static PointF jsonArrayToPoint(JsonReader reader, float scale) throws IOException {\n    float x;\n    float y;\n    reader.beginArray();\n    x = (float) reader.nextDouble();\n    y = (float) reader.nextDouble();","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/airbnb/lottie-android/blob/05ea92e90381eb8a8ae06855ea2b74f322bebbec/lottie/src/main/java/com/airbnb/lottie/parser/JsonUtils.java#L37-L73","documentation":"JsonUtils.jsonToPoint() parses a 2D point from the JSON stream. It handles three token types: NUMBER (bare x,y pair), BEGIN_ARRAY ([x,y]), and BEGIN_OBJECT ({x:...,y:...}). Any other leading token throws IllegalArgumentException. This fires during Lottie JSON parsing when a point field (vertex, in-tangent, out-tangent, position, anchor point) starts with unexpected JSON structure.","triggerScenarios":"The Lottie JSON contains a point value that is neither a number, an array, nor an object — e.g., a string, boolean, or null where coordinates are expected. Also possible with truncated or corrupted JSON where the reader encounters an unexpected token after a structural error earlier in the stream.","commonSituations":"Corrupted or truncated Lottie animation file; animation exported by a non-standard tool that formats points differently; hand-edited JSON with syntax errors in coordinate sections.","solutions":["Validate the Lottie JSON with a JSON linter and Lottie validator (e.g., lottiefiles.com validator) before loading.","Locate the point field in the JSON where parsing fails (use the path/line info from the exception) and fix the malformed coordinate data.","If the file is from a third party, re-download or re-export it to eliminate corruption."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-validate the JSON is well-formed before loading into Lottie\ntry (JsonReader reader = JsonReader.of(source)) {\n    // quick structural validation pass\n} catch (Exception e) {\n    // JSON is malformed; do not pass to Lottie\n}","typeGuard":null,"tryCatchPattern":"LottieTask<LottieComposition> task = LottieCompositionFactory.fromAsset(context, name);\ntask.addListener(result -> { /* success */ })\n     .addFailureListener(e -> { /* malformed JSON — show fallback */ });","preventionTips":["Validate Lottie JSON files with a JSON linter and LottieFiles validator before shipping.","Use LottieCompositionFactory async APIs (fromAsset/fromInputStream) which return LottieResult instead of throwing synchronously.","Re-export animations from supported tool versions."],"tags":["lottie","json-parsing","point","malformed-json","illegal-argument"],"backgroundTag":null,"analyzedSha":"05ea92e90381eb8a8ae06855ea2b74f322bebbec","analyzedAt":"2026-08-14T00:51:35.636Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}