Another rant -- JSON key naming convention
-
{"account-number": "1234"}
Seriously? A dash? I know some languages support that (I think Ruby? X| ) but really, can we get with modern and more standard keys that are easily serializable from the object? Now I'll have to code attributes for the key names. :mad:Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
{"account-number": "1234"}
Seriously? A dash? I know some languages support that (I think Ruby? X| ) but really, can we get with modern and more standard keys that are easily serializable from the object? Now I'll have to code attributes for the key names. :mad:Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
Well, at least it's not a space.
-
Well, at least it's not a space.
Using a hex-editor one could add "08" right after the space, and most programs would not show it nor the space :D
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
{"account-number": "1234"}
Seriously? A dash? I know some languages support that (I think Ruby? X| ) but really, can we get with modern and more standard keys that are easily serializable from the object? Now I'll have to code attributes for the key names. :mad:Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
i ran into the same problem with XML and at one point had developed a complex naming and case transformation system that could split on camel, title, even CAPS_UNDERSCORE casing and transform to any of those, and it handled embedded "-"s by using XML serialization attributes It seems like a lot of work, and it is, but something like that, if you're doing a lot of serialization like this, might become inevitable. I'm not sure how it would all translate to JSON either - i guess that depends on what your JSON serialization code/lib looks like.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
-
{"account-number": "1234"}
Seriously? A dash? I know some languages support that (I think Ruby? X| ) but really, can we get with modern and more standard keys that are easily serializable from the object? Now I'll have to code attributes for the key names. :mad:Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
account-number is JavaScript friendly like accountNumber. Account_Number is SQL friendly (for example). It does not bother me too much this types of key naming convention...
-
{"account-number": "1234"}
Seriously? A dash? I know some languages support that (I think Ruby? X| ) but really, can we get with modern and more standard keys that are easily serializable from the object? Now I'll have to code attributes for the key names. :mad:Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
Why hasn't camelCase or PascalCase simply taken over the world by now? What is wrong with people? Why would some dev who types with two fingers want to reach up there for a dash anyways? What is wrong with people? :laugh:
camelCase is filth.
-
account-number is JavaScript friendly like accountNumber. Account_Number is SQL friendly (for example). It does not bother me too much this types of key naming convention...
T-SQL accepts [account number] , but that doesn't make it right.
-
camelCase is filth.
PIEBALDconsult wrote:
camelCase is filth.
I hope you are serious. And I hope you are saying that because you are a staunch supporter of PascalCase. If you are one of those Hungarian Notation people, we will have to remove your dev card. :laugh: Back in the day Hungarian would fly, but now, we kick you off of CP for that. :laugh:
-
{"account-number": "1234"}
Seriously? A dash? I know some languages support that (I think Ruby? X| ) but really, can we get with modern and more standard keys that are easily serializable from the object? Now I'll have to code attributes for the key names. :mad:Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
PIEBALDconsult wrote:
camelCase is filth.
I hope you are serious. And I hope you are saying that because you are a staunch supporter of PascalCase. If you are one of those Hungarian Notation people, we will have to remove your dev card. :laugh: Back in the day Hungarian would fly, but now, we kick you off of CP for that. :laugh:
Hungarian (ptui) is the worst form of camelCase.
-
T-SQL accepts [account number] , but that doesn't make it right.
[account number] isn't development friendly, it's only for reports... It's disgustingly horrible (for DataColumns). :laugh:
-
[account number] isn't development friendly, it's only for reports... It's disgustingly horrible (for DataColumns). :laugh:
How about this one I have to deal with?
[Is the application used to provide merchant or other external entities with PAN/SAD related services]
-
{"account-number": "1234"}
Seriously? A dash? I know some languages support that (I think Ruby? X| ) but really, can we get with modern and more standard keys that are easily serializable from the object? Now I'll have to code attributes for the key names. :mad:Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
Please calm down and slowly back away from the keyboard. There problem solved.
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software