How can I force a property of an object to be output as a string when returned as JSON

Posted by E-Madd on Stack Overflow See other posts from Stack Overflow or by E-Madd
Published on 2010-05-20T21:11:27Z Indexed on 2010/05/21 4:20 UTC
Read the original article Hit count: 306

Filed under:
|
|

I'm storing color values as HEX in my database, which is mapped via ORM settings in CF9. When my color values are entirely numeric (e.g. 000000), ColdFusion is serializing them as numbers (e.g. 0.0) when returned from my CFC as JSON. Is there a way to force these columns/properties to be serialized as strings?

© Stack Overflow or respective owner

Related posts about coldfusion

Related posts about JSON