Conversation
|
Welp, I've run into this on the C# side now in my usage of this project... guess it's time to focus some attention on this PR. |
|
The issue with Ruby here is that as soon as we return an array value we lose all the Centroid magic--the objects in the array are just standard Ruby hash objects. I'm not sure what approach we want to take here, since the only things that come to mind involve reaching into the array and changing the hashes into centroid objects or swapping out the arrays for special centroid arrays, but either way I think we'd end up having to traverse and modify the whole tree...and we've already got concerns about mutability as described in #43. I'm certainly interested in other ideas. |
|
Does C# still have these issues with the ExpandoObject implementation? |
|
C# doesn't have these issues at all right now, with the changes I've implemented as part of other PRs. The only language that still has issues is ruby, as described in #53 (comment) . |
|
I pushed a simple change that gets the Ruby tests passing, but comes with the caveat of only supporting 1 dimensional arrays. I recall chatting offline with @ralreegorganon about this awhile ago, and I think we agreed that 1 dimension is fine, as a 2D array that needs the shininess seems like an extreme edge case. Anyone have thoughts about this? |
|
Sounds good enough to me. Merge it. |
This PR currently fixes and breaks things.
Currently Ruby supports iterating an array but not indexing it. I haven't looked into why yet. The test for iterating the JSON object also fails
but I'm not convinced it's needed (see #52).C# can index an array OK. However, it can't iterate an array and then get the fancy property treatment on the item. I think this is because
GetEnumerator()just returns the underlyingJObject'sGetEnumerator()which isn't aConfigclass with fancy properties.Python is all good.
Tasks
This will close #41 after the tests are passing.