Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ReadAsciiFile retruns empty data on Jsonparsing

Hi everyone,

I am tried to read the JSON file for getting the values and it returns the empty values. I am using eclipse in Ubuntu machine.

I was tried the example given in roku sdk JSONParsing.zip and it was working. But when I tried it in new project it showed the following error.

BRIGHTSCRIPT: ERROR: ParseJSON: Data is empty: pkg:/source/Main.brs(85)
BREAK (runtime error &hf8) in pkg:/source/Main.brs(85)


I was used this code.

CategoryAsString = ReadAsciiFile("pkg:/json/category_list.json")
m.json = ParseJSON(CategoryAsString)
print m.json


Is that I need to add any other plugins or need to check file permissions. But file permissions also given 755 access.

Any help will be much appreciated.

Thank you.
I am using Roku 4 - 4400X Model.
0 Kudos
2 REPLIES 2
dcrandall
Visitor

Re: ReadAsciiFile retruns empty data on Jsonparsing

Are you using the plugin for eclipse? I ask because famously it decides it's not going to add files when you first start your day.

You've checked the zip file that the json file is there?
0 Kudos

Re: ReadAsciiFile retruns empty data on Jsonparsing

Hi dcrandall,

Yes. Eclipse not included the json file while zipping. So only the json file are missing.

Everytime While zipping i need to check the json folder is added or not.

Thank you for clarifying this.
I am using Roku 4 - 4400X Model.
0 Kudos