Skip to main content

All Questions

Tagged with
1 vote
0 answers
4k views

Postres: "No operator matches the given name and argument types. You might need to add explicit type casts."

I'm trying to convert a JSON integer array to a postgres array for doing a WHERE clause, but I can't get it right. Tried casting to the array and to the whole subquery but I keep getting: "LINE ...
Edmond Tamas's user avatar
  • 3,285
1 vote
3 answers
53 views

Get an element in Json using PostgreSQL

I have this JSON and I want to get this part: '1000000007296871' in SQL {"pixel_rule":"{\"and\":[{\"event\":{\"eq\":\"Purchase\"}},{\"or\&...
Tom Tom's user avatar
  • 352
0 votes
0 answers
487 views

How to cast multiple columns from sql query into one object in java?

Alright guys, I'm just trying to get a list of objects from my table 'ItemList'. I feel like I'm just messing up the query that I'm using. This is the code I'm running: public List<...
SvanSomeren's user avatar
-1 votes
1 answer
214 views

Errors trying to convert type [Any] to JSON with Swift

I'm trying to convert an object type [Any] to a JSON or something I can use to access the attributes. Steps: I call a function from a library to connect to a bluetooth device and retrieve data from ...
user10816637's user avatar
-1 votes
1 answer
274 views

Convert dynamic string to JSON using javascript

I am using API that its response contains dynamic array of strings as the following: var arr = ["Request.name","Request.name.first","Request.name.first.last"]; //response 3 so i want to convert it ...
Mohammed Alawneh's user avatar
0 votes
1 answer
46 views

I want to pass a string to an obect

I am using a widget which uses class objects as follows: $p->data = array(array(array('01-Jan-2017',200),array('02-Feb-2017',210))); but I want to build this array dynamically using data from a ...
kcoops's user avatar
  • 29
0 votes
0 answers
514 views

casting json response to object array

I am trying to learn a bit of angular 2. I am making a simple application to make groups by random order. I followed the heroes tutorial and the part that is throwing me is where the json response is ...
Michael Philip's user avatar
-1 votes
1 answer
536 views

Convert JSON to array in MySQL column using Laravel

I have a column that stores a data in JSON format in MySQL table in form of a:3:{s:2:"12";s:0:"";s:2:"34";s:0:"";s:2:"56";s:10:"1234567890";} But since $cast was introduced in Laravel 5, I was ...
Vitalij's user avatar
  • 704
0 votes
2 answers
1k views

Convert JObject to multi-dimensional array

How do you convert a JObject to a 3D array? I have a JObject that is formatted as such: { "0": [ [ 1.0, 2.0, 3.0 ], [ 4.0, 5.0, 6.0 ] ], "1": ...
Roka545's user avatar
  • 3,618
-1 votes
1 answer
81 views

How to get an array of Objects (Object[]) from a JSON in Java

I have the following array of Objects put in a JSONObject: Object[] objs=new Object[4]; objs[0]=null; objs[1]=1234; objs[2]="test1"; objs[3]="test2"; JSONObject j=new JSONObject(); j.put("objs", ...
Gef's user avatar
  • 11
1 vote
2 answers
2k views

Dynamic type cast in select query

I have totally rewritten my question because of inaccurate description of the problem! We have to store a lot of different informations about a specific region. For this we need a flexible data ...
cansik's user avatar
  • 2,004
2 votes
2 answers
2k views

json.NET throwing an InvalidCastException deserializing a 2D array

I'm attempting to deserialize a 2 dimensional array of double values from a json string. The following code replicates my problem: using Newtonsoft.Json; using Newtonsoft.Json.Linq; // Here is the ...
kdbanman's user avatar
  • 10.5k
4 votes
1 answer
28k views

com.google.gson.JsonObject cannot be cast to com.google.gson.JsonArray

I have some trouble with parsing a JSON response. The response data: { "deal": { "categorie": { "description": "Offres Shopping", "idcategorie": "1", "...
stackHunter's user avatar
2 votes
3 answers
370 views

Unsetting array values (after casting an object to an array)

Hello I am trying to unset an array element from this array Array( [52] => stdClass Object ( [name] => test [company] => sf [addr] => sdf [email] =>...
XkiD's user avatar
  • 159