I have gone to https://try.jsonata.org/ and copied the addresses json file. I have entered into my code the expression on the right side and run my app. I do not get the result in my app that is shown in https://try.jsonata.org/. So, I know this is a very generic question, but is there anything "special" I need to do to get JSONata to work in an Electron app?
Turns out that I was evaluating the stringified JSON. Once I evaluated on the actual JSON object, everything worked as expected.
Related
I have an MVC application that can accept a file. It basically follows the example shown here for uploading a single file: https://www.c-sharpcorner.com/article/upload-files-in-asp-net-mvc-5/.
However, I would like to create a command line console utility from which I can upload a file. I think that I very generally understand this would likely involve creating a web request, adding certain headers, and attaching a byte array for the file but I'm a bit lost as to what this entails specifically.
Also for the console application, I will obviously modify the action to return a json result instead of a view.
Oh my gosh it was so much easier than I expected. I just used the WebClient.UploadFile() method and it worked like a charm.
I have problems adding a new URL when I manage knowledge base in QnAMaker.
I've tried adding this Url but I get the error:
Failed to extract QnAs from the source "URL" - Unsupported / Invalid url(s). Failed to extract Q&A from the source.
I've tested deleting the footer, publishing the page and in this case the URL works properly.
Also, I tested other very similar URLs, like this one and this has been parsed successfully.
What could be the problem?
It would appear that something with the way the questions are encoded on that page is preventing QnAMaker's services from reading the text of the question/answer pairs. In order to get those questions, I was able to copy paste the whole list:
I put them all into a word doc (or equivalent program), and then saved it as a PDF:
Then uploaded this to QnA Maker, where it was able to read the question/answer pairs just fine.
The reason I used a PDF as opposed to a .txt file is so the alternate characters (the Spanish ? for example) would render as well as the bullets from the final question that caused so much grief for the initial renderer.
After left feedback in azure site, QnA Maker Team fixed it. Now, the url is parsed properly.
I've been playing with Saxon-CE_1.1 over the last few days and have managed to create a little application that allows users to classify pictures according to a data dictionary using a select dialog. All was going really well until I tried to use the result-document() function in it's "classic" way, to create a new file in the file system containing the choices the user has made.
XML Quire is returing with a severe error stating:
XpathException in mode: '{http:saxonica.com/ns/interactiveXSLT}onclick' event: [object MouseEvent]: Expected '?select=' ir '#' at start of result document href found "filename.xml
This error seems, to me, to be stating that I must pipe the results back into the HTML using # or ?select/
Is it still possible to create "external" output using SaxonCE? If so how can I accomplish the task.
Until recently it has not been possible to read or write files in the local client machine from Javascript code running in the browser, and if Javascript can't do it, then Saxon-CE can't do it either.
This may change soon with the HTML5 FileSystem API, but as far as I'm aware support for this is still very patchy. When it appears to be more stable and widespread, we can certainly look at implementing both doc() and xsl:result-document to access local filestore (or indeed, implementing the EXPath file module).
I am developing a mobile app with the AppMobi tools and xdk. If I make a call to (accepts POST only) http://mg.smartmax.com/sightmaxwebservices/sightmaxwebservice.svc/jsoperator/TestjqMobi
The returned json fails parsing on iOS only (android works fine). This same call works fine in mobile safari, but it seems when its called from the app, it takes a different path and errors. This seems to be a known issue and was wondering if anyone had a good workaround?
I work at appMobi - this appears to be a bug with the native container in iOS. Have you tried building your app and testing (app*lab doesn't have the latest code base).
What are you using to parse the JSON? Something like
var obj = JSON.parse(data);
As a workaround for now I suppose you could just include and use another parser.
Make sure that your server is properly encoding the JSON.
I ran into this exact same issue. If you are using Drupal as your backend, use their function drupal_json_encode instead of PHP's json_encode. The information I was passing to the app was generated by a WYSYWIG editor, and perhaps that is what drupal's json encoding function takes into account that php's json encoding doesn't.
I'm sending emails from a Rails application. The emails contain links like the following:
http://critically.in/events/14-san-francisco-ca-mc-hammer-bay-to-breakers
The URL is correct when I open it on my computer, but when I read it in Mail on my iPad or iPhone, the link is converted to:
x-apple-msg-load://90CEFE95-A78E-427F-B68E-EF184F497B69/critically.in/events/14-san-francisco-ca-mc-hammer-bay-to-breakers
Make sure your links are actually fully qualified. That is, make sure they are containing the scheme and the entire domain-path.
bad: ../blah/foo/bar
good: http://example.com/blah/foo/bar
Relative URLs are not properly resolved by the iOS mail client and result into things looking like the issue you are describing.
To be absolutely certain, make sure you check the raw message text and not the results you see within other mail-clients.