BookmarkSubscribeRSS Feed
saifislam
Calcite | Level 5

my html script read .json file successfully in Viya 3.4
<input type="text" multiple class="multipleInputDynamic" data-url="/test.json" id="eNBR" name="eNBR" required>

 

We are told Viya 4.0 is not going to read .json file- is that correct- if so, what's the solution

6 REPLIES 6
gwootton
SAS Super FREQ
How are you reading this in with Viya 3.4? Viya 3.x, 4 and SAS 9.4 M5+ have a JSON libname engine that can read JSON from a fileref.
--
Greg Wootton | Principal Systems Technical Support Engineer
saifislam
Calcite | Level 5

I am able to read it in SAS Viya 3.4 with the following code (also in 9.4):

 

<input type="text" multiple class="multipleInputDynamic" data-url="/test.json" id="eNBR" name="eNBR" required>

 

Question- I am told SAS Viya 4.0 is NOT going to read .json file. I want to confirm that. and also want to know the alternate solution.

Tom
Super User Tom
Super User

Is that what VIYA code looks like?
That looks like HTML to me.

saifislam
Calcite | Level 5

Yes. that's a code html and done in Viya. That is the proposition of Viya- it can read any open source such as html, python.

I write my html code and also link with SAS code- it works. 

Now my question is- to developer who have done html+sas code in Viya- can Viya4.0 read .json file?

gwootton
SAS Super FREQ
I'm afraid it's not clear to me how you are engaging Viya (or SAS 9) with the code snippet you've provided.

Viya has REST APIs which are engaged via HTTP and there are the SWAT libraries for connecting to Viya from R, Python, Java and Lua (https://developer.sas.com/guides/open-source-sas.html)

I'm not aware of any limitation added to prevent those from being passed JSON in Viya 4.
--
Greg Wootton | Principal Systems Technical Support Engineer
Reeza
Super User

@saifislam wrote:

 

 

We are told Viya 4.0 is not going to read .json file- is that correct- if so, what's the solution


Where did you get this information? It's very rare for SAS to deprecate features as backwards compatibility is one of their selling points. Not saying you're wrong but it seems weird to deprecate something like this so first, let's check that assumption. 

 

Your code seems like something that is using JSON as a data source within a customized visual in a VA dashboard? When you upgrade you will need to redevelop any customized portions which is standard when you customize out of the box software.