Last active
December 17, 2015 14:38
-
-
Save robjshaw/5625543 to your computer and use it in GitHub Desktop.
dealing with Scientific notation in deserializeJson() in Coldfusion - DRAFT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset stArgumentStructure = deserializeJSON(arguments.jsonStructure) /> | |
| <cfloop collection="#stArgumentStructure#" item="argumentItem"> | |
| <cfif (isStruct(stArgumentStructure[argumentItem]))> | |
| <!--- structure we'll loop down one level... ---> | |
| <cfloop collection="#stArgumentStructure[argumentItem]#" item="argumentItemChildren"> | |
| <cfif isNumeric(stArgumentStructure[argumentItem][argumentItemChildren])> | |
| <cfset stArgumentStructure[argumentItem][argumentItemChildren] = trim(numberformat(stArgumentStructure[argumentItem][argumentItemChildren], '__________________________________________________________')) /> | |
| </cfif> | |
| </cfloop> | |
| <cfelseif isNumeric(stArgumentStructure[argumentItem])> | |
| <cfset stArgumentStructure[argumentItem] = trim(numberformat(stArgumentStructure[argumentItem], '__________________________________________________________')) /> | |
| </cfif> | |
| </cfloop> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment