[Coldbox 3.5] JSON.cfc override

Hi folks,

I’m in the process of upgrading to 3.5 and need to override the “new” way of rendering JSON to use they way it was handled in previous versions. I downloaded the JSON.cfc from Forgebox and placed it within coldbox.system.extensions.plugins and when I reinit I get the following error. Note, I have also cleared the template and ocomponent cache. Any ideas?

Thanks.

etail [{RAW_TRACE={ at cfSES2ecfc1508802366$funcADDROUTE.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc:405)},ID={CF_TEMPLATEPROXY},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc},LINE={405},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfSES2ecfc1508802366$funcADDMODULEROUTES.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc:197)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc},LINE={197},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfRoutes2ecfm61984697._factor0(/Library/WebServer/Documents/platform/api/v01/config/Routes.cfm:34)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/api/v01/config/Routes.cfm},LINE={34},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfRoutes2ecfm61984697.runPage(/Library/WebServer/Documents/platform/api/v01/config/Routes.cfm:1)},ID={CF_ROUTES},TEMPLATE={/Library/WebServer/Documents/platform/api/v01/config/Routes.cfm},LINE={1},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfFrameworkSupertype2ecfc680502568$func$INCLUDE.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/FrameworkSupertype.cfc:455)},ID={CFINCLUDE},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/FrameworkSupertype.cfc},LINE={455},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfSES2ecfc1508802366$funcINCLUDEROUTES.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc:320)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc},LINE={320},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfSES2ecfc1508802366$funcIMPORTCONFIGURATION.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc:1277)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc},LINE={1277},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfSES2ecfc1508802366$funcCONFIGURE.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc:68)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/interceptors/SES.cfc},LINE={68},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfInterceptorService2ecfc190710442$funcREGISTERINTERCEPTOR.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/InterceptorService.cfc:192)},ID={CF_TEMPLATEPROXY},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/InterceptorService.cfc},LINE={192},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfInterceptorService2ecfc190710442$funcREGISTERINTERCEPTORS.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/InterceptorService.cfc:100)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/InterceptorService.cfc},LINE={100},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfInterceptorService2ecfc190710442$funcONCONFIGURATIONLOAD.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/InterceptorService.cfc:71)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/InterceptorService.cfc},LINE={71},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfLoaderService2ecfc1467938965$funcLOADAPPLICATION.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/LoaderService.cfc:77)},ID={CF_TEMPLATEPROXY},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/web/services/LoaderService.cfc},LINE={77},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfColdbox2ecfc1138312082$funcLOADCOLDBOX.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/Coldbox.cfc:71)},ID={CF_TEMPLATEPROXY},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/Coldbox.cfc},LINE={71},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfColdbox2ecfc1138312082$funcRELOADCHECKS.runFunction(/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/Coldbox.cfc:102)},ID={CF_UDFMETHOD},TEMPLATE={/Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/Coldbox.cfc},LINE={102},TYPE={CFML},COLUMN={0}}, {RAW_TRACE={ at cfApplication2ecfc1523304759$funcONREQUESTSTART.runFunction(/Library/WebServer/Documents/platform/api/v01/Application.cfc:151)},ID={CF_TEMPLATEPROXY},TEMPLATE={/Library/WebServer/Documents/platform/api/v01/Application.cfc},LINE={151},TYPE={CFML},COLUMN={0}}]
ErrorCode [empty string]
ExtendedInfo [empty string]
Message Error importing routes configuration file: The method isValidJson was not found in component /Library/WebServer/Documents/platform/common/frameworks/coldbox350/system/extensions/plugins/JSON.cfc. Ensure that the method is defined, and that it is spelled correctly.

Yea. Look in the git repo. We have a fix for that plugin.

Or just creat an IsJson method on it

Thanks Luis, Is the fix on the latest master branch or develop?

thanks

Nolan

Hey Luis,

Can you provide me a bit of clarity on how the latest repo/branch implements the fix?

I just tried the following.

  1. Deleted coldbox system folder from my app
  2. Downloaded latest 3.5 from github (master branch)
  3. Copied system folder into my app
  4. Downloaded JSON.cfc plugin from github
  5. Created extensions/plugins folder and placed JSON.cfc within
  6. Cleared template and component cache
  7. FWReinit

Resulted in the same error.

Any ideas? did I go about it the wrong way?

Thanks.

Nolan

Let me update the one in ForgeBox, as I have not had time. I;ll ping you once I am done.

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

Ok, updated the forgebox entry. You can use it now.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Thanks I will check it out!

Nolan Dubeau

Load .,8,1

I get the same issue but i need to relaod the page and the issue goes
away. I put JSON.cfc under plugins folder and then reference to it
getMyPlugin("JSON").encode. As Luis recommended I 've download the
updated version of the JSON.cfc and repalce my JSON.cfc in the plugins
folder