What is the safest file format to convert a large JSON file for use in Kotlin (android)?

I have a large JSON file that I need to work with in a Kotlin (android) project. Due to its size, I’m considering converting it to a different file format for better performance or easier handling.

What would be the safest and most compatible file format to convert this JSON file into, while still being easily readable and usable in Kotlin?

Any recommendations or best practices would be appreciated!

You could try YAML, but I think the format matters less than the way you read it. There are streaming libraries available for many formats, including JSON.

Also, there is a “compressed JSON” format called CBOR, if the file doesn’t have to be human readable: https://cbor.io/