Questions tagged as 'json'

1
answer

Convert objects: from literal syntax to prototype types

Given a type defined in javascript, for example: var Point = (function () { function Point(x, y) { this.x = x; this.y = y; } Point.prototype.dist = function () { return Math.sqrt(this.x * this.y + this.x * t...
asked by 03.05.2014 / 17:18
1
answer

How to handle a String in JSON format?

Let's say I get the following content that is stored in a String: { "client_id": 1580, "videos": 4, "remote_urls": [{ "url": "rtsp://aniceurl.com" }, { "url": "rtsp://aniceurl.com" },...
asked by 01.10.2018 / 13:53
1
answer

I can not ignore fields when trying to return them as Json causing "Infinite recursion"

I'm working with Hibernate , Spring and Jackson (to ignore the fields) and trying to return the User < strong> in a request json java returns error due to @OneToMany and @ManyToOne mapping with the Profile class. Does anyone know why?...
asked by 11.03.2016 / 06:57
1
answer

Help JSON Delphi

Good afternoon! Could you help me read this JSON file in Delphi. I have already tried numerous classes, including the Delphi native, and I was able to read only the data from the first node, such as status. I use the Delphi XE6 version. {...
asked by 09.12.2016 / 18:41
1
answer

jQuery cutting words with space

I have a screen where the lines are loaded according to the data of the database and for this I have a PHP + jQuery and the like for the creation of the same one. What happens is that the array that sends the data comes correctly, but at the tim...
asked by 17.04.2018 / 14:52
2
answers

What is the difference between "require" and "require-dev"?

In Composer , Grunt for example, it has require and require-dev . My question is what's the difference between them? Example phpBB "require": { "php": ">=5.3.3,<7.0", "lusitanian/oauth": "0.2.*", "symfony...
asked by 23.05.2016 / 17:11
1
answer

How to authenticate in site via HttpUrlConnection to get access to JSON method?

I have an Android application that should request a JSON to a web application, however to access the method it is necessary to log in to the site. How do I perform this identification via code? Webservice.java package br.ufscar.dc.contro...
asked by 16.08.2015 / 02:31
1
answer

Dynamize Ajax Autocomplete Jquery with json data

I want to make dynamic suggestions with this API . < br> How to streamline the suggestion file by listing data from the mysql database?    Download DEMO:    link The file countries.js is what contains the suggestion dictiona...
asked by 10.11.2014 / 21:17
1
answer

Know the name of the object in JSON

I have a JSON and I need to know the name of my object and the values it has, for example: {"Pessoas" : [ {"Nome": "Welson Play", "Idade":19}, {"Nome": "Stephanie", "Idade":15}, {"Nome": "João P...
asked by 08.07.2015 / 13:11
1
answer

Search Index of the array from the json value using indexOf

I have the following array: var usuarios = [ {nome: "João", id: 1}, {nome: "Maria", id: 2}, {nome: "José", id: 3}, {nome: "Ana", id: 4}, ]; I need to return the user index José. I tried using indexOf as follows: var...
asked by 16.06.2016 / 02:12