argument has type java.lang.Double, got java.lang.Integer
See original GitHub issueHi there,
I try to parse some objects from an PHP-JSON-API.
In my Kotlin class I have
val workingPriceNetto: Double,
But the json could hold 0 as well - 0. seems to be not possible with PHP (unless its a string “0.00”)
The parser should handle a 0 value as a Double
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Provided id of the wrong type for class . Expected: class java ...
Have a look at definition of your repository. Does it have right generic type? do you have Integer as second parameter?
Read more >Double (Java Platform SE 8 ) - Oracle Help Center
The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field...
Read more >Calling Java from Kotlin
Note that a boxed primitive type used as a type parameter is mapped to a platform type: for example, List<java.lang.Integer> becomes a List<Int!>...
Read more >Data types that map to database data types in Java applications
Mappings of Java data types to data server data types for updating database ... BigDecimal, long, int, short, byte, float, double, boolean, java.lang.String....
Read more >Java Programming Tutorial on Generics
In generics, instead of passing arguments, we pass type information inside the angle brackets <> . ... Integer cannot be cast to class...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good point, fixed.
Right, make it an
Any
and type check it at runtime…