he
> Sent: 25 July 2018 17:49
> To: Any question about pharo is welcome
> Subject: Re: [Pharo-users] NeoJSON sorting instance variables/properties
>
>
>
> > On 25 Jul 2018, at 17:54, Henrik-Nergaard wrote:
> >
> > Hi Peter,
> >
> > This functionall
Kenny
-Original Message-
From: Pharo-users On Behalf Of Sven
Van Caekenberghe
Sent: 25 July 2018 17:49
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] NeoJSON sorting instance variables/properties
> On 25 Jul 2018, at 17:54, Henrik-Nergaard wrote:
>
> Hi Pe
> On 25 Jul 2018, at 17:54, Henrik-Nergaard wrote:
>
> Hi Peter,
>
> This functionallity is already available in STON where it preserves the
> order when you use an OrderedDictionary.
> And was implemented for the usecase of dealing with fileout and versioning.
> Perhaps the same could be ad
Hi Peter,
This functionallity is already available in STON where it preserves the
order when you use an OrderedDictionary.
And was implemented for the usecase of dealing with fileout and versioning.
Perhaps the same could be added to NeoJson so that instead of some magic
flag you provide an Order
> On 25 Jul 2018, at 11:34, Peter Uhnák wrote:
>
> Ah, you are right that it might not be human-friendly.
>
> I don't want to rely on the order, but for (file) versioning it is quite
> valuable. (or rather changing the order can easily make versioning quite
> worthless).
Ah, OK, I understa
Ah, you are right that it might not be human-friendly.
I don't want to rely on the order, but for (file) versioning it is quite
valuable. (or rather changing the order can easily make versioning quite
worthless).
I can manually sort it, but it creates a lot of mess:
(NeoJSONWriter on: stream)
pr
From json.org
"An object is an unordered set of name/value pairs."
IOW, it is not in the spec, it would be dangerous to rely up it in any way (not
that you are suggesting that). It might look better sometimes, but even then
alphabetic sorting might not be the most human friendly or most mea
Hi,
would it be possible to provide option to automatically sort instance
variables when serializing objects?
Either always sorted
NeoJSONObjectMapping>>writeObject: anObject on: jsonWriter
jsonWriter writeMapStreamingDo: [ :jsonMapWriter |
(properties sorted: #propertyName ascending) do: [ :eac