Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367260 - JSON conversion fails for nullable date/timestamp fields on record returned from a service
Summary: JSON conversion fails for nullable date/timestamp fields on record returned f...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 367261
  Show dependency tree
 
Reported: 2011-12-20 21:11 EST by Will Smythe CLA
Modified: 2017-02-23 14:17 EST (History)
3 users (show)

See Also:


Attachments
Project demonstrating the problem (23.70 KB, application/x-zip-compressed)
2011-12-20 21:13 EST, Will Smythe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Smythe CLA 2011-12-20 21:11:30 EST
See attached project. I have a record that contains a few simple fields:

record Student

	firstName string;
	lastName string;
	hireDate date?;
	active boolean?;

	d decimal(9,2)?;
	t timestamp?;	
	i int?;
	f float?;

end

Note that 'hireDate' is marked as nullable. If I instantiate a new Student and return it from a service function, I get a 'JSON conversion cannot be performed on field:hireDate in common.Student' error in the RUI handler calling this function. If I set hireDate to a non-null value or make the 'hireDate' field not nullable, everything works.

So, there seems to be an issue with JSON conversion of nullable date/timestamp fields. I tried this with a few other primitive types (boolean, decimal, int) and even if the value of the field is null, it works (i.e. my callback function in my RUI handler is invoked).

See attached project.
Comment 1 Will Smythe CLA 2011-12-20 21:13:01 EST
Created attachment 208652 [details]
Project demonstrating the problem
Comment 2 Joseph Vincens CLA 2012-01-19 11:22:14 EST
fixed
Comment 3 Will Smythe CLA 2012-02-21 07:58:10 EST
Verified in 2/20 nightly build.