subhalaxmi
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2015
09:27 PM
Write To Temp File
Hi All
I want to write my jsonstring to tmp file.
<code>
WriteAsciiFile("tmp:/example.txt",msg.GetString())
text=ReadAsciiFile("tmp:/example.txt")
jsonData = ParseJSON(text)
print jsonData
</code>
it gives error when on 3rd line.PARSEJSON Unknown Identifier Error.When I am writing the same response in local file and read it only.It is working fine.What to do.Please help me.I need help urgently.
I want to write my jsonstring to tmp file.
<code>
WriteAsciiFile("tmp:/example.txt",msg.GetString())
text=ReadAsciiFile("tmp:/example.txt")
jsonData = ParseJSON(text)
print jsonData
</code>
it gives error when on 3rd line.PARSEJSON Unknown Identifier Error.When I am writing the same response in local file and read it only.It is working fine.What to do.Please help me.I need help urgently.
4 REPLIES 4

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2015
09:32 PM
Re: Write To Temp File
Sounds like the same error you're having here: viewtopic.php?t=91192
which still suggests that there's a problem with your JSON string. Any chance you have unicode characters in there that could possibly be throwing off the parser?
which still suggests that there's a problem with your JSON string. Any chance you have unicode characters in there that could possibly be throwing off the parser?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
subhalaxmi
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2015
10:09 PM
Re: Write To Temp File
But I acould not be able to debug api issue.Can you please tell me where is my tmp file..How can I see that file contents .
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2015
08:07 PM
Re: Write To Temp File
You read your tmp file into text, so
-JT
print text
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
subhalaxmi
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2015
09:39 PM
Re: Write To Temp File
Thnaks guys.I solved it by replacing starting characters from jsonstring.