News for hackers. Stuff that matters.
Re:Parsing JSON Is a Minefield (2018) by HelloNurse on Sunday August 18, 2019 @07:19AM (#20729557)
In a somebody sent this input to my program context, designing some means to choose between these three results (or possibly others) is the main concern. Actual parsing is the easy part.
Re:Parsing JSON Is a Minefield (2018) by juliusmusseau on Sunday August 18, 2019 @05:07PM (#20732868)
Do you get the user to choose? Great, now the UI is 2x more complex.

Do you just go with what the browser or client locale says? (User lives in Canada but their laptop is set to Turkish locale).

Go with the locale tied to the geo location of the user instead? (User above stubbornly enters all amounts using Norwegian conventions after completing high school in Norway).

If it's important, a confirmation page presented to the user and formatted in their presumed locale can help a lot.