Json Parsing Swift 3 Alamofire

I am new at swift 3.00 and I got problems with getting Json return then sending request. I am trying to send post request to server with parameters username and password and get respond with Json with information, but I haven't been able to get the d...
more »

2017-01-10 19:01 (1) Answers

How to add a method to parse a JSON file in Java

I am trying to parse the content of JSON file text.json by using Jackson library. What I want is to make a java method in the following code to get all keys and values of it, but so far in my code I get only the first key and the first value of the ...
more »

2017-01-09 13:01 (2) Answers

Linux sscanf function doesn't fill variable

I am currently writing an FTP server and I need to parse the ip and port of a remote server from an input string buffer in the following format: xxx,xxx,xxx,xxx,yyy,zzz where: xxx stands for an ip address octet in decimal yyy is round((remote po...
more »

2017-01-09 03:01 (3) Answers

Android Studio edit text numeric type

I need to store an integer value into database, so I need to convert the value of the textfields into integers and for some reason I'm getting this exception: java.lang.NumberFormatException: Invalid int: "android.widget.EditText{431fbec VFED..CL. ....
more »

2017-01-08 19:01 (2) Answers

How does ruby parse 2 /3/ 4 as 2 ÷ 3 ÷ 4?

A lot of ruby's syntax and parsing is relatively logical, but I am confused as to how ruby knows, from context, that 2 /3/ 4 is 2 ÷ 3 ÷ 4 instead of parsing /3/ as a regex? It's a correct parsing, but /3/ is also a valid regex, and how would it kno...
more »

2017-01-04 23:01 (1) Answers

BeautifulSoup `find_all` generator

Is there any way to turn find_all into a more memory efficient generator? For example: Given: soup = BeautifulSoup(content, "html.parser") return soup.find_all('item') I would like to instead use: soup = BeautifulSoup(content, "html.parser")...
more »

2016-12-29 03:12 (3) Answers

parse_url() PHP works strange

I'm trying to get host from url using parse_url. But in some queries i get empty results. Here is my function: function clean_url($urls){ $good_url=array(); for ($i=0;$i<count($urls);$i++){ $url=parse_url($urls[$i]); //$te...
more »

2016-12-23 21:12 (5) Answers

Changing Zend View content Output/Parsing Modules

I want to create module which could change the final View output on the contents which it have recive from apropriate controller. For exaple - I have Page Module with PageController which has show method. The show method gets page's data from data...
more »

2016-12-09 23:12 (0) Answers

split String by space separated

I need to split words by space separated in java, so I have used .split function in-order to achieve that like as shown below String keyword = "apple mango "; String keywords [] = keyword .split(" "); The above code is working fine but the only i...
more »

2016-12-01 14:12 (5) Answers

Jackson mapping json to objects

Lets say I have object like this { first: "value", second: "value", third: { first: "first value third", second: "second value third", fourth: { first: "second nested object", second: "second nested object" }, ...
more »

2016-11-22 20:11 (1) Answers

newtonsoft jobject.Value<DateTime>() won't work

When I use following code: string jsonStr = JsonConvert.SerializeObject(new { savedAtGMT0 = DateTime.UtcNow.ToString() }); MessageBox.Show(jsonStr); JObject jsonObj = JObject.Parse(jsonStr); MessageBox.Show(jsonObj["savedAtGMT0"].Value<string...
more »

2016-11-20 20:11 (1) Answers

Pandas read nested json

I am curious how I can use pandas to read nested json of the following structure: { "number": "", "date": "01.10.2016", "name": "R 3932", "locations": [ { "depTimeDiffMin": "0", "name": "Spital am Pyhr...
more »

2016-11-14 13:11 (1) Answers

Convert string value to type

Say I have an object, and I'm storing all of it's attributes as pure JSON. Is there a way to store the .getClass() value in such a way as to be able to retrieve it and get the original object? Ex: class foo { int test; String classType; } //other...
more »

2016-11-11 12:11 (3) Answers

gson model for array

I have a JSON file like following: { "count": 60, "value": [{ "changesetId": 60, "url": "http://...", "author": { "id": "...", "displayName": "*...", "uniqueName": "...
more »

2016-11-09 22:11 (1) Answers

How to parse json file with two {{

How I can find elements that are placed in json file like this: {"media": {"caption_is_edited": false, "code": ... This didn't work: with open("C://json.txt") as data_file: data = json.load(data_file) print(data["media"]["caption_is_edited"]...
more »

2016-11-04 10:11 (0) Answers