Thanks Thomas for pointing this out.
I discussed this with Jürgen yesterday and we came up with several solutions of which we both currently prefer the one that adds the type of the value in the string value (of course only for date and timestamp values):
- an Any-Date would be serialized as „2011-01-01@type:date“,
- an Any-Timestamp would be serialized as „2011-01-01T12:34:56.789+0200@type:timestamp“
The effort to implement this solution would be minimal (compared to other solutions). Besides that we will handle this problem exactly the same both in JSON and in BON.
What do you think?
BTW: This approach is not new: http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx
Cheers
Igor
Von: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] Im Auftrag von Thomas Menzel
Gesendet: Mittwoch, 28. September 2011 09:47
An: Smila project user mailing list
Betreff: Re: [smila-user] smila date value vs. new processing
Ok thx.
I have opened bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=359187 for this and had to give it major prio (after considering critical) due to the effect on existing installations.
@igor
We need to see if that stalls our release.
Thomas Menzel @ brox IT-Solutions GmbH
From: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] On Behalf Of Jürgen Schumacher
Sent: Mittwoch, 28. September 2011 08:48
To: Smila project user mailing list
Subject: Re: [smila-user] smila date value vs. new processing
Hi,
Yes, good point, I was bothered about this myself, but there were other priorities…
I think it should be simple to extend BON to include the type information for string values, and that should solve most problems. I’ll have a look into it when making the specs public, but I’ll also have to do some discussions with colleagues.
I’m not sure yet what we good do about it in JSON. Maybe we could use JSON annotations. I’ll have to take a look into it.
Cheers,
Jürgen.
Hi folks,
The json spec states that dates are converted to strings and if u need dates u convert them urself if needed. I want to use XML anyhow, so no problem, right?
Well, not quite it seems. With the new processing (no AMQ) it seems that internally Json/BON is used and as a consequence I don’t get date values anymore into my pipelines.
Is there any way to preserve the date value as a type? Any tricks?
If not: I think we would need to amend this! After all: what would be the point of the date type then?
Thomas Menzel @ brox IT-Solutions GmbH