Forum Discussion

pdineshkumar55's avatar
10 years ago

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.

2 Replies

  • 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?
  • 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.