3 Replies Latest reply on May 1, 2013 6:15 PM by Kavinsky69

    error cf with deserializeJSON


      Hi everyone,

      I have a problem while using the function deserializeJSON.

      I have a request looking like this :

      Request: {   'config': {   'bgSubtractor': {   'config': {   'learningRate': 1e-06,

                                                          'mogHistory': 52,

                                                          'mogSigmaSquared': 80.456140350877},

                                            'input': {   'image': 'blur.image'},

                                            'type': 'BGSubtractor'},

                        'blur': {   'config': {   'size': 3.0},

                                    'input': {   'image': 'cropArea.image'},

                                    'type': 'MedianBlur'},

                        'cropArea': {   'config': {   'rect': '{meta.areaSampleRect}'},

                                        'input': {   'image': 'video.image'},

                                        'type': 'Crop'},

                        'cropMaskBGSub': {   'config': {   'rect': '{meta.motionSampleRect}'},

                                             'input': {   'image': 'bgSubtractor.image'},

                                             'type': 'Crop'},

                        'cropMotion': {   'config': {   'rect': '{meta.motionSampleRect}'},

                                          'input': {   'image': 'cropArea.image'},

                                          'type': 'Crop'},

                        'dataSaver': {   'config': {   'columns': [   'frameCount', ..... etc


      but when i tried to deserialized it I got the error below. I know it's because I have this float as a scientific notation "1e-06". When I removed it, it's working fine.

      Is there anyway to resolve this problem?




      {"ExtendedInfo":"","Message":"Invalid Syntax Closing [}] not found","Detail":"","additional":{},"Extended_Info":"","ErrNumber":0,"TagContext":[{"id":" ??","template":"\/home\/ubuntu\/lib-src\/railo-4\/webroot\/optimizer\/index.cfm","codePrin tPlain":"130: \t

      #qMasterData.request#<\/pre> \n131: \t<\/cfoutput>\t\n132: \t\n133: \t\n134: \t
      #qMasterData.request#<\/pre>\n","column":0,"line":132,"raw_trace":"optimizer.index_cfm$cf.call(\/home\/ubuntu\/lib-src\/railo-4\/webroot\/optimizer\/index.cfm:132)","type":"cfml","codePrintHTML":"130: \t<pre style="white-space: normal">#qMasterData.request#<\/pre> 
      \n131: \t<\/cfoutput>\t
      \n132: \t<cfset json = deserializeJSON(qMasterData.request) ><\/b>
      \n133: \t<cfoutput>
      \n134: \t<pre style="white-space: normal">#qMasterData.request#<\/pre>
      \n"}],"ErrorCode":"0","StackTrace":"Invalid Syntax Closing [}] not found\n\tat