Describe the bug
A NullPointerException is thrown when attempting to load a valid Lottie JSON file where the key-value pairs inside have been rearranged/reordered (but no data has been stripped or optimized away). This suggests that the parser may be relying on a strict key order when instantiating gradient properties.
What version of Lottie did you test this on?
6.7.1
What version of Android did you test this on?
API Level 36 (Android 16)
Steps To Reproduce
- Take a working Lottie animation .
- Rearrange the key-value pairs (e.g., passing it through a JSON formatter or linter that alphabetically reorders keys, without minifying or deleting anything).
- Load the rearranged JSON using LottieAnimationView or LottieCompositionFactory.
- Observe the crash.
Thrown Error
java.lang.NullPointerException: Attempt to invoke virtual method 'com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation com.airbnb.lottie.model.animatable.AnimatableGradientColorValue.createAnimation()' on a null object reference
Describe the bug
A NullPointerException is thrown when attempting to load a valid Lottie JSON file where the key-value pairs inside have been rearranged/reordered (but no data has been stripped or optimized away). This suggests that the parser may be relying on a strict key order when instantiating gradient properties.
What version of Lottie did you test this on?
6.7.1
What version of Android did you test this on?
API Level 36 (Android 16)
Steps To Reproduce
Thrown Error