From 827210e0106142696934d6a33b336a24de98a430 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Tue, 31 May 2022 13:48:09 +0000 Subject: [PATCH] fix: enable reserved names in mp_jsonout. Closes #249 --- all.sas | 8 ++++---- base/mp_jsonout.sas | 2 +- meta/mm_createwebservice.sas | 2 +- server/ms_createwebservice.sas | 2 +- viya/mv_createwebservice.sas | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/all.sas b/all.sas index d80128e..330057e 100644 --- a/all.sas +++ b/all.sas @@ -8787,7 +8787,7 @@ options %do i=1 %to &numcols; %if &i>1 %then "," ; %if &action=OBJ %then """&&name&i"":" ; - &&name&i + "&&name&i"n /* name literal for reserved variable names */ %end; %if &action=ARR %then "]" ; %else "}" ; ; /* now write the long strings to _webout 1 byte at a time */ @@ -15164,7 +15164,7 @@ data _null_; put ' %do i=1 %to &numcols; '; put ' %if &i>1 %then "," ; '; put ' %if &action=OBJ %then """&&name&i"":" ; '; - put ' &&name&i '; + put ' "&&name&i"n /* name literal for reserved variable names */ '; put ' %end; '; put ' %if &action=ARR %then "]" ; %else "}" ; ; '; put ' /* now write the long strings to _webout 1 byte at a time */ '; @@ -19753,7 +19753,7 @@ data _null_; put ' %do i=1 %to &numcols; '; put ' %if &i>1 %then "," ; '; put ' %if &action=OBJ %then """&&name&i"":" ; '; - put ' &&name&i '; + put ' "&&name&i"n /* name literal for reserved variable names */ '; put ' %end; '; put ' %if &action=ARR %then "]" ; %else "}" ; ; '; put ' /* now write the long strings to _webout 1 byte at a time */ '; @@ -22014,7 +22014,7 @@ data _null_; put ' %do i=1 %to &numcols; '; put ' %if &i>1 %then "," ; '; put ' %if &action=OBJ %then """&&name&i"":" ; '; - put ' &&name&i '; + put ' "&&name&i"n /* name literal for reserved variable names */ '; put ' %end; '; put ' %if &action=ARR %then "]" ; %else "}" ; ; '; put ' /* now write the long strings to _webout 1 byte at a time */ '; diff --git a/base/mp_jsonout.sas b/base/mp_jsonout.sas index be2c7bc..c81db42 100644 --- a/base/mp_jsonout.sas +++ b/base/mp_jsonout.sas @@ -231,7 +231,7 @@ %do i=1 %to &numcols; %if &i>1 %then "," ; %if &action=OBJ %then """&&name&i"":" ; - &&name&i + "&&name&i"n /* name literal for reserved variable names */ %end; %if &action=ARR %then "]" ; %else "}" ; ; /* now write the long strings to _webout 1 byte at a time */ diff --git a/meta/mm_createwebservice.sas b/meta/mm_createwebservice.sas index 68ba65b..984e04c 100644 --- a/meta/mm_createwebservice.sas +++ b/meta/mm_createwebservice.sas @@ -264,7 +264,7 @@ data _null_; put ' %do i=1 %to &numcols; '; put ' %if &i>1 %then "," ; '; put ' %if &action=OBJ %then """&&name&i"":" ; '; - put ' &&name&i '; + put ' "&&name&i"n /* name literal for reserved variable names */ '; put ' %end; '; put ' %if &action=ARR %then "]" ; %else "}" ; ; '; put ' /* now write the long strings to _webout 1 byte at a time */ '; diff --git a/server/ms_createwebservice.sas b/server/ms_createwebservice.sas index 9b4cd05..ea678ce 100644 --- a/server/ms_createwebservice.sas +++ b/server/ms_createwebservice.sas @@ -266,7 +266,7 @@ data _null_; put ' %do i=1 %to &numcols; '; put ' %if &i>1 %then "," ; '; put ' %if &action=OBJ %then """&&name&i"":" ; '; - put ' &&name&i '; + put ' "&&name&i"n /* name literal for reserved variable names */ '; put ' %end; '; put ' %if &action=ARR %then "]" ; %else "}" ; ; '; put ' /* now write the long strings to _webout 1 byte at a time */ '; diff --git a/viya/mv_createwebservice.sas b/viya/mv_createwebservice.sas index c2c44a0..c71c69a 100644 --- a/viya/mv_createwebservice.sas +++ b/viya/mv_createwebservice.sas @@ -408,7 +408,7 @@ data _null_; put ' %do i=1 %to &numcols; '; put ' %if &i>1 %then "," ; '; put ' %if &action=OBJ %then """&&name&i"":" ; '; - put ' &&name&i '; + put ' "&&name&i"n /* name literal for reserved variable names */ '; put ' %end; '; put ' %if &action=ARR %then "]" ; %else "}" ; ; '; put ' /* now write the long strings to _webout 1 byte at a time */ ';