spark85 / json-path

Automatically exported from code.google.com/p/json-path
0 stars 0 forks source link

com.jayway.jsonpath.spi.JsonProvider.createArray() should return Object, not Iterable #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In 1.9.1, I'm trying to implement a JsonProvider for Java 8's Nashorn native 
javascript objects. jdk.nashorn.internal.objects.NativeArray is used to 
represent JS arrays, but it doesn't implement Iterable. I can't write a 
JsonProvider that can work with NativeArray, for the sole reason that 
com.jayway.jsonpath.spi.JsonProvider.createArray() returns Iterable. In all 
uses of createArray(), the variable that createArray() is assigned to is 
Object. There's also a method JsonProvider.toIterable() which can take care of 
converting the Object to Iterable when necessary. This method signature just 
doesn't seem to fit with the rest of the interface. 

Original issue reported on code.google.com by wt...@pivotallabs.com on 24 Jun 2014 at 7:45

GoogleCodeExporter commented 9 years ago
This is fixed and will be part of upcoming release.

Original comment by kalle.st...@gmail.com on 4 Aug 2014 at 10:36