Pretty much every JSON parser in java does this by default. Why? Because they were all written before Optional existed.
I have to agree with the Optional hate. I loved it in Scala but after a few months on Kotlin I don't think I can go back.
I have to agree with the Optional hate. I loved it in Scala but after a few months on Kotlin I don't think I can go back.
Any sane json library has to support newer Java idioms, if not it is not worth using.