aspose file tools*
The moose likes Java in General and the fly likes Help with JSN file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help with JSN file" Watch "Help with JSN file" New topic
Author

Help with JSN file

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

First off, I know this is probably the wrong forum, so please feel free to move this to the correct one - I'm just not sure which it belongs in.

But basically I have some survey software that allows you to export the answers in text. The output results in the following: [["text answer"]]. But problems are arising when users input the following two characters: & and #
For example, is a user answers like this: ben & jerry, the output in the debug looks like this [["ben
As you can see it cuts off everything after the & (same with #). This is breaking the dat file and the entire application follows.

This did not happen when this was not on a server, only once I started using dat files and JSN. I am not sure where would be best to handle this problem, so I am pasting the code for the JSN where this is causing an issue. But please let me know if I should handle it elsewhere and how I should go about it if possible. The only reason I am putting in this .inc file is because this was not a problem until I started using it.



True wisdom is in knowing you know nothing - Socrates
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

Researching this has told me I need to do something like this in the inc file before it saves:



Now I just need to figure out where exactly to do that, and what to replace "somestring" with
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

Wow, I finally figured out what this is, and I am on the wrong site altogether huh? lol
 
Consider Paul's rocket mass heater.
 
subject: Help with JSN file