error cf with deserializeJSON


hi everyone,

i have problem while using function deserializejson.

i have request looking :

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

 

when tried deserialized got error below. know it's because have float scientific notation "1e-06". when removed it, it's working fine.

is there anyway resolve problem?

thanks,

 

kavinsky69

{"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

 

i'm using coldfusion 9 , works fine me.

 

isnumeric(1e-06);  // true jsn = '{"string":"foo","number":123.456,"scientific":1e-06}'; struct = deserializejson(jsn); writedump(struct); 

struct.png

 

you can try run isnumeric(1e-06) double check if it's picking number in scientific notation.

 

as said, works fine me in coldfusion, might bug in railo: https://groups.google.com/forum/?fromgroups=#!topic/railo/tzwii5e0caq



More discussions in ColdFusion


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account