Questions tagged as 'json'

1
answer

Dynamize language for placeholder

I do an ajax request to fetch in the database to bring the language configuration, type, PT-BR, EN, and so on ... I want the placeholders to be changed according to the chosen language. For example, instead of being placeholder='Digite seu...
asked by 29.08.2017 / 01:31
1
answer

Get data in JSON

[ { "ID": 1, "ano": 5 } ] I do not know how I get in JSON the value of each of the fields, in this case "1" and "5", as I present above. In getting the data in JSON I tried to follow some tips that I have been looking for but in vain. I pre...
asked by 14.08.2017 / 13:02
2
answers

How to write data from a form into a database by converting the fields to JSON?

I have some form, example: <form action="confi.php" method="post" enctype="multipart/form-data"> <p><input type="text" name="nome" value="nome"> <p><input type="text" name="email" value="email"> <p>...
asked by 15.03.2017 / 16:19
2
answers

API Central Bank, IPCA and SELIC

I was asked for a project, to make monthly consultation of IPCA and SELIC rate, from a central bank API. I wanted to know where I could find this API, because I found nowhere, nor the site itself.     
asked by 09.03.2017 / 14:36
2
answers

How to traverse a hierarchical tree to generate an HTML

I'm having trouble generating a function responsible for traversing and returning a hierarchical tree. Follow JavaSript / JSON code: let tree = { label: 'Elemento A', itens: [ { label: 'Elemento A1',...
asked by 28.07.2017 / 20:14
1
answer

PHP - pushing array into another array

I'm trying to make a array inside another and include more data in array inside, how do I do that? Follow the code of the attempt, it is to generate a json : $data = array( "login1" => "login1", "login2" =>...
asked by 21.07.2016 / 18:24
2
answers

How to find a pattern to keep the same data modeling between a JSON object, a POJO, and JPA?

To make it easier for me to understand my question, follow the example below: A POJO: public class Person { private String name; private String location; } String JSON: String json = {name:"Jose", location:"Eslovenia"}; Se...
asked by 26.07.2016 / 22:36
2
answers

Check ip, register in array, convert to json and write to file

Personally I'm having a problem. I have a script in php that opens a json file, decodes it with json_decode and then checks to see if the json object exists in the current visitor's ip, if it has it, but if it does not, it registers in an array...
asked by 09.01.2017 / 19:12
2
answers

String Comparison

Problem: I have to get the object that displays the content in the English language (lang == en) But depending on the search the order of the languages comes completely different and I tried to create a loop obj.take['http://dbpedia....
asked by 01.02.2017 / 02:20
2
answers

What better way to parse a very large json file in java?

I have a very large file in json, it has 5 gigs and has 652339 lines, I was thinking of using the Gson library in java. I'd like to know, what is the best way to parse from file, since neither the json framework was able to extract it right....
asked by 26.09.2015 / 16:11