3 ms·
How about serializing to an array ["bigint", "170141183460469231731687303715884105727"]? It takes more space, but is easy to recognize, and easy to generalize t
by tzs 8y ago
How about serializing to an array ["bigint", "170141183460469231731687303715884105727"]? It takes more space, but is easy to recognize, and easy to generalize to other types.
- jfk13 8y agoPresumably that could be confusing if you ever happen to have an actual array whose first element is the string "bigint".
- hombre_fatal 8y agoWell, no matter what you do, surely you plan on documenting your API to such a bare bones level that your user isn't racking their brain whether a key is a number or an array of data.
- repsilat 8y agoNah, you just have to also encode all arrays like ["array", [...]] ;-)