json to query

I just ran my version again - just to make sure seeing as the feed might have changed. It works still.

I’m using Railo though so it might handle the nasty characters better than ACF. Sorry I can’t be more help without a version of ACF…

RIght, I ran your code on runnable on a CF10 instance, and the problem is your bugs aren’t escaped when they’re saved into the bug system, so there’s no way to “correct” them afterwards. For instance:

{
“id”: 694301000000024153,
“key”: “7”,
“project”: {
“id”: 694301000000014351
},
“flag”: “Internal”,
“title”: “Error when Printing Social Security Document”,
“description”: "

Error when trying to flatten documentid 68
<table class=“cfdump_query”…

That 'class=“cfdump_query” would need to be 'class=“cfdump_query”.

I’m pretty impressed that railo can handle it ok to be honest. I’m not sure how it does it.

If you have access to the bugs before they are saved, try using htmleditformat to escape them which might help you…

That is one of the reasons 10+ years ago, I started using single quotes instead for output. It saves having to remember to escape double quotes in scenarios like this.

For example…

writeOutput("

Sometext goes here
");

Or you could write it this way.

writeOutput(’

Sometext goes here
');

But it is interesting to note, that Railo handles this very well for json. If I did read that right, maybe ColdFusion needs to be enhanced here!

The downside to getting into that habbit, editors like MonoBehavior and Unity don’t let you use single quotes the same way as ColdFusion and JavaScript.

Problem is since it’s an API I don’t have access to the bugs to escape this before it becomes JSON.

I’ve found a way to access the same data using an RSS feed and I’d like to access this via wirebox like this example.

map("latestNews").inCacheBox(timeout=40,lastAccessTimeout=20,provider="ehCache");.toRSS("[http://news.google.com/news?output=rss](http://news.google.com/news?output=rss)")

Problem is that the feed is secured. I guess I need to see if the feed will 
accept the username and pass via the url?


But I don’t see anywhere, where you have said you tried

LOCAL.test3=replace(LOCAL.test2,char(13) & chr(10),’’,‘ALL’);

You also stated

I ended up just deserializing using CF’s DeserializeJSON function. I’d like to know if anyone thoughts around the right or wrong of doing this verus what Coldbox has?

ColdBox JSon is a wrapper to what you did above, so I am confused. We are going to need some more information.

Like what is the exact error and line this error is occurring on, you mention validation, as this is also the ColdFusion IsJson() maybe we have an issue with that in ColdFusion. But more importantly, what version of ColdFusion are you running this on and what version of ColdBox. I doubt it will be ColdBox as an issue, as the json stuff as been pretty rock solid for years.

As far as what you need to inject, go to the plugins and you will see the json plugin there that just extends the core component that you point us too.

But I would dare say that the reason there is a return and line format in the string, is that this is how it was entered as paragraphs maybe. If that is the case then you will need to do a search for this in the string an replace them with how you need to handle returns and paragraphs.

My advice would be to show us the exact code that is failing and the line and stack trace, without this information it is like looking for a needle in a haystack. Because ColdBox uses the CF’s DeserializeJSON function then I doubt that this is the exact problem, so it must be something along the lines of validation the Json and if that is the case then it might be a ColdBox issue in the way it does everything else before calling the IsJson() function from ColdFusion.

I would love to pin point your exact problem, but you have given us to many unknowns to really help.

Zoho development fixed the JSON so I don’t need to.

Even better…