Read file Json in Java Action

0
Hi every one,  I’m having trouble reading a json file. I write  a piece of code to read the file but when I  try it again I get an error like in the picture . If I use ‘’././” I  can read the file json in eclipse, but when connecting to mendix I get an error.    
asked
2 answers
0

Hi Le Hoang,

The issue you’re facing seems more of a java issue see stackoverflow here.

On another note, why don’t you use Import mapping which would be more easier to work with in Mendix and you won’t have to write custom java action for it.

Hope this helps!

answered
0

HI Le Hoang Vu,

For reading content of Json files You can use ‘StringFromFile’ java action from Community commons module which will return the Content as String.

Then as Radhika mentioned you can make use of Import mapping to convert into mendix objects.

answered