Bug #81331 | MySQL Workbench exporting invalid JSON with "NULL" value | ||
---|---|---|---|
Submitted: | 5 May 2016 22:59 | Modified: | 18 May 2016 20:11 |
Reporter: | Juan Laporte | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench | Severity: | S2 (Serious) |
Version: | 6.3.6 | OS: | MacOS (10.11.4) |
Assigned to: | CPU Architecture: | Any | |
Tags: | export, json |
[5 May 2016 22:59]
Juan Laporte
[6 May 2016 10:05]
MySQL Verification Team
Hello Juan Laporte, Thank you for the report. Observed this on Win7 with WB 6.3.6. Thanks, Umesh
[6 May 2016 10:06]
MySQL Verification Team
-- How to repeat -- CLI session mysql> show create table t1\G *************************** 1. row *************************** Table: t1 Create Table: CREATE TABLE `t1` ( `id` int(11) NOT NULL, `name` varchar(100) DEFAULT NULL, KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql> insert into t1(id) values(1); Query OK, 1 row affected (0.00 sec) mysql> select * from t1; +----+------+ | id | name | +----+------+ | 1 | NULL | +----+------+ 1 row in set (0.00 sec) -- WB session, export it as JSON [ { "id" : 1, "name" : NULL } ] -- Try to validate above data Error: Parse error on line 3: ... "id": 1, "name": NULL}] ---------------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'
[18 May 2016 20:11]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Workbench 6.3.7 release, and here's the changelog entry: Exporting data to JSON was exporting NULL values as NULL instead of null, thus breaking the JSON output. Thank you for the bug report.
[22 Sep 2017 6:03]
MySQL Verification Team
Bug #87828 marked as duplicate of this one