quoting it like "name" = whatever works for case, ...
# lucee
b
quoting it like "name" = whatever works for case, but i'm not seeing anything about the ordering
s
arrays are natively ordered, aren't they? I've had to create ordered structs on occasions when I wanted attributes in a certain order but it shouldn't be re-ordering arrays just from serializing them
b
they're being created via arrayAppend.. so that may be where the ordering is getting messed up.
q
Arrays would stay in sequential order. Structs (which is what most JSON objects are) would be not be ordered.
👍 1
Yeah, I would do a cfdump or look at the object in memory with the debugger to see what Lucee thinks it should be.
b
thanks. i'll give that a whirl
e
for future ref, in lucee (not sure about ACF) you can declare a struct to be ordered with shorthand
[:];
or
[=];
https://docs.lucee.org/reference/functions/structnew.html
👍 1
z
structs are deserialized ordered on import, and if they are ordered, then that is preserved when serializing