1. Scott Roberts
  2. Valentina Database ADK
  3. Thursday, July 12 2018, 10:05 PM
  4.  Subscribe via email
I am new to JSON, so I'm not sure if this is a bug or an error on my part.

I am using Valentina Studio 8.3.5.

I am attempting to use a JSON string in a stored procedure. The following code does not produce the string that I expect to see.


begin
declare v_json string;
set v_json = json_build_object(
'name', 'My Name',
'date_time', '07/12/2018 17:55:00',
'bool_value', true
);
print v_json;
end

-- Result is {"name":"","date_time":7,"bool_value":1}


Also, anytime I attempt to use the json_extract_path function, Valentina Studio crashes. For example:


print json_extract_path(v_json,"date_time");
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
Hi Scott,
Seems to be a bug, I will fix it ASAP.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Ruslan Zasukhin Accepted Answer
Monday we will try to make 8.3.6 hotfix build.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Scott Roberts Accepted Answer
Thank you.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Ivan Smahin Accepted Answer
Scott, I can not reproduce any crash with json_extract_path function, could you give me some real example how you did it?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Scott Roberts Accepted Answer
Ivan, it was happening with the code I posted above (and it happened again on my machine yesterday).

Did the fix to Mantis #8309 correct the problem?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
Scott Roberts Accepted Answer
Ivan,

I downloaded 8.3.6 and I'm still having an issue with json_extract_path. I typed the following in the SQL Editor and Valentina Studio crashed.


select json_extract_path('[1,25,77]',1)


I selected the option to send the crash report to the developers.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 7
Ivan Smahin Accepted Answer
Still no crash here.
Please check - is it

select json_extract_path('[1,25,77]',1)

crashed for you?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 8
Scott Roberts Accepted Answer
Yes. I rebooted my machine to make sure I was starting from a "clean slate."

I typed the code above in the SQL Editor. When I attempted to execute it, the application crashed. I have attached screenshots of the code that I typed and the crash report, which I sent to the developers.
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 9
Scott Roberts Accepted Answer
I also attempted the json_extract_path statement in my original post. That crashed also.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 10
Scott Roberts Accepted Answer
Clarification: The print v_json statement worked as expected, but json_extract_path(v_json, 'date_time') crashed.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 11
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories