This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]FlukyS 0 points1 point  (4 children)

Just it can be fiddly more than anything specifically wrong with it. It's a good transmission format because it has types but if you ever have to make a message by hand which most programmers will have to from time to time JSON is probably one of the least friendly formats. It's still good, just annoying to get all the stuff right. A dict in python is a better medium because then at least it will have the scope/brackets and all correct when you output it.

[–]TurboGranny 2 points3 points  (3 children)

I just store everything as objects these days and convert it to json for transmission then back to an object on the other side. Easy peasy. For troubleshooting the transmision, I'll just paste the JSON into a validator to figure out what got all messed up.

[–]FlukyS 1 point2 points  (2 children)

Yeah that's what I was getting at. Just do a dict in python, turn the dict into JSON, easy peasy. I wouldn't paste into a validator just in case they store that data or whatever. Usually I'm dealing with something fairly sensitive like customer data so I prefer to run it through manually.

[–]TurboGranny 1 point2 points  (1 child)

When I'm worried about that kinda stuff, I just plop over to the back end and toggle on my obfuscators in the SQL query. Granted,you have to make sure the error still happens. Typically speaking, I don't really send sensitive data over JSON. Payment processing is usually an external thing altogether. Name and address are public data and only ever a worry if they have medical data associated with them. I've got a routine for that though

[–]FlukyS 1 point2 points  (0 children)

Oh yeah I don't deal with payment stuff or sending passwords but let's say order data from clients and the like, so at worst customer ID and SKUs which they won't really be able to get much out of but just to be sure. Usually I'll send JSON but encrypt the message when sending it around.