web stats
Mirth Connect CSV File to JSON - Page 2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #11  
Old 07-14-2013, 11:20 PM
StefanScholte StefanScholte is offline
 
Join Date: May 2009
Location: Netherlands, Harderwijk
Posts: 321
StefanScholte is on a distinguished road
Default

Perhaps this is a very stupid question. But I will ask it anyway.

Why do I need to import JSON.js?
I did a little test and as far as I know JSON.stringify is already usable.

with kind regards
Stefan Scholte
Reply With Quote
  #12  
Old 07-15-2013, 01:19 AM
santosam santosam is offline
OBX.2 Kenobi
 
Join Date: May 2012
Location: Portugal
Posts: 62
santosam is on a distinguished road
Default

I myself use JSON.stringify without importing anything at all.
I think that Rhino has the JSON Object already built-in. On a REPL console of Rhino, this works: print(JSON.stringify({"teste":[]}));

Last edited by santosam; 07-15-2013 at 06:55 AM. Reason: typo
Reply With Quote
  #13  
Old 07-15-2013, 06:16 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,097
narupley is on a distinguished road
Default

You guys are right, Rhino is now compatible with all features of ECMAScript 5, including a native JSON parser. That wasn't always the case; it was added in 1.7R3, which came out mid-2011.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #14  
Old 07-16-2013, 11:48 AM
cherribuggy cherribuggy is offline
Mirth Newb
 
Join Date: Jul 2013
Location: Pittsburgh, PA
Posts: 8
cherribuggy is on a distinguished road
Default How could I set this up to monitor an FTP site rather than a file folder

I have this channel set up and it is picking up files deposited in a folder on a drive, how could I set the source up to monitor an FTP site instead? Thank you for all your help last week!
Reply With Quote
  #15  
Old 07-16-2013, 11:49 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,097
narupley is on a distinguished road
Default

Quote:
Originally Posted by cherribuggy View Post
I have this channel set up and it is picking up files deposited in a folder on a drive, how could I set the source up to monitor an FTP site instead? Thank you for all your help last week!
Switch the File Reader from "file" mode to "ftp", and fill in the necessary information.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Tags
csv, http sender, json

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:02 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation