On Sat, Nov 15, 2008 at 8:18 PM, kangax <[EMAIL PROTECTED]> wrote:
> On Nov 15, 7:36 am, Malte <[EMAIL PROTECTED]> wrote:
>> Joose provides a Role called Joose.Storage that makes Joose objects
>> storable. The preferred method is JSON and a custom toJSON method is
>> provided to make serialization with json2.js automatic. However, when
>> used in conjunction with Prototype.js the resulting objects seems to
>> be encoded again (More info: In effect the problem only occurs if the
>> Joose objects is located with regular JS objects).
> Could you explain what "located with regular JS objects" means? It
> would also be helpful to see a stripped down version of this bug -
> the test suite doesn't provide any pointers as to what/where went
> wrong (or at least I can't find any).
In the sentence above, I meant "within", like if you serialize
serializing the jooseObject by itself works. This seems to be due to a
toJSON method that is injected into the Array prototype by
Prototype.js. Can this be true.
The source code of the test is located at
Interestingly the statement at line 49 succeeds. (It stringifies a
Joose object to JSON and and deserializes it again)
The statement on line 81, howevery, fails to produce correct JSON. The
produced string looks like this:
When you set a firebug break point in Storage.js line 11 you can see
that the code goes deeply into Prototype.js territory.
>> We would really like to get Joose to pass all tests when run with
>> Prototype. Could somebody give us a hint about what is going wrong?
>> You can run the test individually and see the problem right
>> Thank You,
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at