Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [smila-user] smila date value vs. new processing

+1 from me.

 

Greets,

Daniel

 

Von: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] Im Auftrag von Jürgen Schumacher
Gesendet: Mittwoch, 19. Oktober 2011 17:36
An: Smila project user mailing list; Smila project developer mailing list
Betreff: Re: [smila-user] smila date value vs. new processing

 

Hi,

 

after some discussions with colleaques we think that we should do an auto-detection of date/timestamp values when parsing them from JSON or BON. This would mean that

-          a string value of format “yyyy-MM-dd” and being a valid date would be instantiated as a Value with type DATE.

-          a string value of format “yyyy-MM-dd'T'HH:mm:ss(.fff)Z” (i.e. the .fff part is optional, but timezone is mandatory) and valid values for the date and time parts would be instantiated as a Value of type TIMESTAMP.

Additionally we would take care that value.asString() would return the original representation so that a user gets the correct value in any case if (s)he is just interested in the string value and does not want to treat it as a date/timestamp.

 

This would keep the JSON APIs cleaner than having type tags in the string values.

 

We could probably implement this in the next days if there are no major objections.

 

Cheers,

Juergen.

 

 

From: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] On Behalf Of Thomas Menzel
Sent: Friday, September 30, 2011 2:48 PM
To: Smila project user mailing list
Subject: Re: [smila-user] smila date value vs. new processing

 

Since I have not much experience in JSON myself, I really don’t have an opinion if that is a good solution or not and say: whatever u think is best, I vote for it.

 

If anyone wants to say smth. for or against it chime in.

 

Thomas Menzel @ brox IT-Solutions GmbH

 

From: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Novakovic
Sent: Freitag, 30. September 2011 14:28
To: Smila project user mailing list
Subject: Re: [smila-user] smila date value vs. new processing

 

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.

 

From: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] On Behalf Of Thomas Menzel
Sent: Tuesday, September 27, 2011 4:39 PM
To: Smila project user mailing list (
smila-user@xxxxxxxxxxx)
Subject: [smila-user] smila date value vs. new processing

 

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

 

 

Taglocity Tags: smila


Back to the top