Question: I'm trying to use Lottie Library in jetpack compose  

For animating image, I made animating svg file.  

But in <https://lottiefiles.com/svg-to-lottie>, the animating svg file converted to static json file which I didn't intent.  

How could I convert animating svg file to animating json file?

Answer: 
You can use [this](https://javiercbk.github.io/json_to_dart/) tool to convert your json to dart. It also supports null safety and complex lists.
There is no way to do that perfectly. JSON does not contain type information of the kind you need for null safety.

For example, there is no way to know, whether there are fields that are nullable, because it would be perfectly fine to just not have them in the JSON data at all. There also is no way to know whether a field is nullable, that right now is in there and has a value.

So, you can use a generator, but to actually create a good model, you will either need your own knowledge or you need a description like Swagger/OpenAPI that is not just example data, but actual interface definition.