<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This has come up a few times in recent threads, and I wanted to gather some additional info on your real world use cases. Just reply to me, and any input is appreciated:<br>
<br>
1. Does your JSON use snake_case_keys or CamelCase or other?<br></blockquote><div><br></div><div>It depends on whether API is intended to be used with JavaScript clients. JavaScript convention is camelBack so for APIs designed with primary intent of having JavaScript clients it is common to have JSON keys using the same.</div><div>In other cases however snake_case is preferable as it is somewhat easier to read.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Is the key type consistent throughout the JSON?<br></blockquote><div><br></div><div>Hopefully. Inconsistent APIs are painful.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. If JSONEncoder/Decoder converted these, would you have any other need to specify custom keys?<br></blockquote><div><br></div><div>Generally yes.</div><div><br></div><div>Best regards,</div><div>Rimantas</div></div></div></div>