Hello jeroen. You can open json_spec test and add the test case for me? I can implement the fix for your version and trunk.which version are you using?
Regards
You are right, the gem right now is built to be used with the trunk
version of restfulie (soon to become beta 2). Do you need to use it
standalone? Let me know what is the code you need to work and I get
the beta 2 out tonight with support to it (both on the tokamak and
restfulie gems).
Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Mon, Dec 27, 2010 at 2:36 PM, Jeroen van Dijk
I will take a look at it today and this evening, will get back to you!
I will create the test case and fix on the old version to ensure
backward compatibility.
Do you need to use 0.9.3 or are you able to start using 1.0.0.beta 2?
Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Mon, Dec 27, 2010 at 3:42 PM, Jeroen van Dijk
Tokamak 1.1.1 is out (thanks to Cirpiani) and Restfulie 1.0.0.beta4
too. To install it you need to gem install restfulie --pre (do not
forget the pre).
Docs are being updated, and except for possible bugs, as soon as the
docs are finished we have 1.0.0.
Can you check if it works with 1.0.0.beta4?
Let me know if you need something./
Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Tue, Dec 28, 2010 at 5:51 AM, Jeroen van Dijk
Great... Donizetti has just fixed the gem requirements yesterday (will
be out on 1.0.0), if you want you can try with out with the trunk
version.
> So I guess the default changed to not have a root?
You are right. This was a tokamak decision when it was extracted from
Restfulie. There is a branch where we tried to implement support to
default root naming, but we came across a few issues. The most
important one was: if you are rendering an array and it has one
element, it is easy to guess the name, but if it has no elements, it
is impossible to guess the type name because there is no type
definition into it.
Any thoughts? We can provide a setting that would provide a default
root element, but it would not work properly with empty arrays. I can
do it for you, do you need it?
> Regards,
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Tue, Jan 25, 2011 at 8:48 AM, Jeroen van Dijk
Hi Jeroen!
Great... Donizetti has just fixed the gem requirements yesterday (will
be out on 1.0.0), if you want you can try with out with the trunk
version.
> So I guess the default changed to not have a root?You are right. This was a tokamak decision when it was extracted from
Restfulie. There is a branch where we tried to implement support to
default root naming, but we came across a few issues. The most
important one was: if you are rendering an array and it has one
element, it is easy to guess the name, but if it has no elements, it
is impossible to guess the type name because there is no type
definition into it.
Any thoughts? We can provide a setting that would provide a default
root element, but it would not work properly with empty arrays. I can
do it for you, do you need it?
So let's stick with the mandatory root element for this release!
Is there anything else you need?
Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Tue, Jan 25, 2011 at 2:54 PM, Jeroen van Dijk
It seems that it makes sense to be Rails compatible actually. Although
the second version would save a few bytes, the first one allows
multiple types within the array...
Nick Sutterer also pointed a warning on tokamak due to object_id and
that the code method should return an integer instead of a string.
I believe we need those two fixed and the best that we can do on the
array side before 1.0 (the it should be compatible up to at least 1.1)
Can you raise the issue at github? I will take care of it
Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Thu, Jan 27, 2011 at 12:55 PM, Jeroen van Dijk
Can you raise the issue at github? I will take care of it
Thanks!
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Fri, Jan 28, 2011 at 10:47 AM, Jeroen van Dijk
Is the problem happening with an array internal to another object
being serialized or is it a root array?
Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
On Mon, Jan 31, 2011 at 7:02 AM, Jeroen van Dijk
Got it. If you can send a sample
2011. 2. 2. 오전 10:19에 "Jeroen van Dijk" <jeroentj...@gmail.com>님이 작성:
The problem is happening with the root array. So currently the root array always needs to be nested in a hash. It can't be just an array at root level like the default Rails way. Do you want me to give a concrete code example of what I mean?
On Wed, Feb 2, 2011 at 1:11 PM, Guilherme Silveira <guilherme...@caelum.com.br> wrote:
>
> H...
Great. What about:
array(@users) do |x|
x.members(:root => "users") do |member, user|
member.values { |values|
values.id user.id
values.name user.name
values.email user.email
}
end
end
What do you think? I think it should be called an array as both maps
and arrays are collections and its ambiguous in json.
Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
2011/2/2 Jeroen van Dijk <jeroentj...@gmail.com>: