My object is to be able to get the data from a notesdocument as JSON
This I can do by using the Domino Data Service via the URL.
The rich text fields are translated to HTML but gets contentTransferEncoding: "quoted-printable"
Is there any way I can avoid that?
Alternatively - another method with which I can get json from all the types of fields in a document - using XPages or java?
Thanks in advance
Maybe DomJson by Michael Nielsen can help you. It is similar in functionality as Domino Data Service but might offer what you need with regards to rich text fields. If not, then you can extend it to your needs since it's open source :-)
Related
My requirement is to have data source for "multilist with search" from third party API which returns JSON. Json do have Ids(Ints) but I want to store them as pipe separated like sitecore store for multilist.
Is there a way to achieve this? Any suggestions will be appreciated.
Sitecore does not have anything like this OOTB. You need to create a custom multilist field.
Here is a good read to start: http://sitecoreblog.blogspot.be/2012/04/how-to-create-custom-multilist-field.html
I am new to wso2 API Manager, trying to set it up expose my plain HTTP POST back end calls as a REST API. I am sure this is not a new pattern that I am trying to achieve here. The requirement is to convert the JSON data coming in (has array structures) into the HTTP URL query string parameters.
After some research through the documentation and other posts on this forum, decided to go with the script mediator that would parse the JSON data and convert it to a string that can be appended to the endpoint URL. Some how I am not able to achieve this.
I have followed the following post that seems to be very straight forward. As the original poster suggested, I am also not able to use getPayloadJSON() method. Even have trouble using the work around suggested there due to JSON.parse() not working.
Link
Also, this approach of editing the service bus configuration from source view does not sound like the correct option. Is there another elegant solution to achieve this? Thanks for the help in advance.
I was able to get both methods working by using an external script instead of the inline java script. Thanks
I used xml earlier and learning JSON now. To restrict the user to enter garbage values for form fields such as address etc, in XML we can define a complex object in schema file. But using JSON How can do that? JSON accepts any data from the user. Could any one please provide me ideas or an example code?
Thanks in Advance.
it is possible to do validation with schemas in JSON :
http://en.wikipedia.org/wiki/JSON#JSON_Schema
depending on what you need to validate :
http://json-schema.org/latest/json-schema-validation.html
Online tool for testing :
http://www.jsonschema.net/
I'm new to OData so I'm sorry if this is a bad question, but I fail to find an answer.
I have a bunch of OData tables, and I would like to provide an option for the user to get the data as a CSV-file.
Now I know OData only supports Atom and JSON, but is there any way to make it return a filestream, or a URL?
I was thinking a URL could direct to a REST-service (not OData) that simply returns a filestream, if filestream directly from OData is impossible.
Any thoughts or ideas are appreciated!
I'm not totaly sure why you want to use oData. But oData essentially means to publish any kind of data in JSON/atom standard format - not CSV.
If you have controll over your oData source you could modify an oData Producer to output CSV filestreams instead of JSON/atom files.(But you wouldn't have a real oData feed anymore)
You could also set up any oData Consumer (you can find those at odata.org) to read your oData source and display it as CSV.
If you choose a server side solution(PHP/JSP/ASP etc.) it should be rather simple to loop through the results of a request and add seperators inbetween.
I'm working on a custom control that will be fed by JSON content and I'm trying to find the best approach to produce and consume it.
Let say the JSON could be from:
Notes View (all documents)
Notes View (subset of documents based on a category or filter)
Notes Document Collection (from database.Search or database.FTSearch)
What I have on my mind is to define some Custom Properties where I can define:
URL that produces the JSON
Object
etc.
So far I'm considering:
REST Service control from ExtLib
XAgent that produces JSON
Domino URL ?ReadViewEntries and OutputFormat=JSON
Does anyone knows if the JSON object loaded in memory has a size limit?
Any suggestion will be appreciated.
Definitely go for the REST Service control from the Extension Library, offers by far the best combination of flexibility vs performance vs development time.
Matt
What about creating the JSON in the view itself and then just read the column values? http://www.eknori.de/2011-07-23/formula-magic/
If you want to parse the json object using ssjs, you can fetch it using an URLConnection and put the resulting object into a repeat control using the eval statement.