JSON

Syndicate content 18 

Hi all,

I'm trying to convert a HL7 section to a XML or JSON string.

We need to save the content of PID section into a SQL Column, therefore we need to convert it into a XML o JSON string

is there any easy way to convert it?

I've tried to convert it directly into a DTL, but all my attempts have been unsuccessful

Best regards,

Francisco Lopez

Last answer 22 December 2016 Last comment 20 December 2016
0   0 0
519

views

0

rating

Is there any way that I can check the native type of an object script variable? (similar to the typeof check in javascript)

 

I see that the DynamicArray class uses the type of the variable for its output, I would like to do something similar when I receive a value as an argument to my method.

USER>s var1 = 123  //No quotes, number type
 
USER>s var2 = "123" //quotes, string type
 

Last answer 9 December 2016
+ 1   0 2
0

comments

281

views

+ 1

rating

I'm working on a REST service which will include a binary stream as a request property. I'm currently encoding the stream as BASE64 and passing it as a string value, but I was wondering if there is anything in the Caché JSON support that may be a better fit for encoding this data? Thanks Chris

Last answer 7 November 2016 Last comment 14 November 2016
+ 1   0 0
443

views

+ 1

rating

Hi, all.
I have CSP application and it needs to get and process data from ajax request with json-content. JSON can be very big.
In this case:
TRY
{
Set RequestObj = ##class(%Object).$fromJSON(%request.Content.Read())
} CATCH(Exception) {
Set Status=Exception.AsStatus()
}
I get just part of getting JSON and validate error in $fromJSON.
If I try to read it all in cycle:
TRY
{
While (%request.Content.AtEnd = 0) {

Last answer 22 August 2016 Last comment 25 August 2016
0   0 1
622

views

0

rating