Questions tagged [json]

JSON (JavaScript Object Notation) is a textual data interchange format and language-independent. Use this tag when this text format is involved. DO NOT USE THIS TAG FOR NATIVE JAVASCRIPT OBJECTS OR JAVASCRIPT OBJECT LITERALS. Before you ask a question, validate your JSON using a JSON validator such as JSONLint (https://jsonlint.com).

0
votes
0answers
3 views

serialize java objet to json string which has Map object, key is string and value is abstract class

i'm trying to serialize java object which has Map, using objectmapper. Below is the code which i'm trying.. public abstract class DataTypeModel { DataType type; String description; ...
0
votes
0answers
4 views

sorting through an array to place code in the proper divs through jquery

currently making a website to index and play movies stored on my hard drive that I've recently pulled off dvds just as a little side project. I have a 'master movie list' json file with all the data I ...
0
votes
0answers
7 views

How to get customer email with Stripe webhook / endpoint

Trying to get a customer email using Stripe endpoint / webhook. This is what I've got so far: <?php require_once('stripe/init.php'); \Stripe\Stripe::setApiKey("...
0
votes
1answer
14 views

Sending json data to backend via HTTP POST in Ionic 4 not working. [Notice: Trying to get property of non-object]

I try to send http request via http post in Ionic 4 to my PHP backend through URLhttp://myexamplehost#1.com/api and it gives me back Notice : trying to get property of non object.... When i send my ...
0
votes
0answers
13 views

Unable to post nested json data in spring boot with rest api with @RestResource

I get 400 code when i test api call, i added @RestResource and still have the same issue: JSON parse error: Cannot construct instance of com.....UserEntry (although at least one Creator exists): ...
0
votes
0answers
8 views

Is it possible to use the JSONObject put method and keep capitalized parameter name?

I am using the JSONObject 'put' method to add an entry to the JSON body of an HTTP request. The value that I am passing to the 'put' method contains of other objects and some of those objects have ...
0
votes
0answers
8 views

NYTimes API Multimedia VUE JS

I am building a simple news site using NYTimes API. I want to create a grid of the articles but cannot figure out how to render the articles thumbnail image onto the page. Here is a reference to the ...
0
votes
1answer
16 views

Bash script to insert variables into a json payload (slack webhook) question

I am trying to insert a variable into my json payload (working in shell script) but I am unsure of how to escape the characters properly I've tried many different escape methods but I'm a total noob ...
0
votes
0answers
11 views

Create chart with json

Estou tentando criar um gráfico com morris, segue o código $.ajax({ type: "POST", url: url, data: "cidade=" + this.value, dataType: "json", success: function (...
0
votes
0answers
8 views

ajv - How to make validation for field what is not required and can be empty or email

In ajv (https://github.com/epoberezkin/ajv): How can I validate field (property) what must be one of those: Not filled at all = No change Filled but empty (whitespaces will be trimed) = Unset field (...
0
votes
0answers
12 views

Draw country border on leaflet map using JSON coordinates

I have a leaflet map, and I have a set of country borders in a long JSON file. I am trying to use the JSON coordinates to draw a solid green border along the border of a country displayed in the map ...
-1
votes
1answer
11 views

Passing in JSON body

I'm writing some unit tests and I'm receiving an error 'SyntaxError: Unexpected token o in JSON at position 1' I understand that this is because JSON.parse is already reading an object. Here is ...
0
votes
1answer
29 views

JSON.parse error while writing json data into json file

I am trying to get JSON data from a localhost URL row by row and insert it into a JSON file. When I try to open the file, I receive an error that says Multiple JSON root elements. import urllib....
0
votes
2answers
32 views

How to add JSON data to a HTML table

Currently I'm fetching data that I need to add to a HTML table once I receive it. I've tried a few things, but I'm not able to add the data dynamically once the page load. I want to add it using ...
0
votes
0answers
13 views

Is it possible to add new content via html input to existing JSON file with fs.writeFile?

I'm fairly new to node.js! I'm trying to write a comment section that's rendered by node.js server. I have a json file, and I pass its value into an ejs file, so far it renders fine. Now I added a ...
0
votes
1answer
21 views

browserslists causing npm build problems/errors

My create-react-app is failing to build, giving this error: ./src/index.css Module build failed: BrowserslistError: Unknown browser query `dead` at Array.forEach (<anonymous>) I've gone ...
-1
votes
0answers
15 views

Conversion of java.sql.Date from JSON into POJO is changing the date

I'm using postman to send a JSON object containing "exDate": "2019-12-12" and converting it into an object on the Java side through Spring MVC with @RequestBody object. When I print the object out, ...
0
votes
1answer
33 views

How to render json to html?

I've JSON file: [ { "key1": "value1", "key2": "value2" }, { "key3": "value3", "key4": "value4" }] Output should be: <h1>value1</h1><p>value2</p><h1>value3</h1>&...
1
vote
0answers
9 views

Json return with special characters

I'm getting as a return from an api a json with the characters "\ u0083", "\ u0087d" and "\ u008d". I changed the encoding to utf-8 and ISO-8859-1 but I did not succeed, please someone could help in ...
0
votes
0answers
10 views

How can i create manual keys for my firebase childs

i want to create a manual email key on each login to each child values entered to it. i stored the logged in email in a string but i want to create the key with that specific email in the database. ...
2
votes
1answer
23 views

What is the correct way to convert json data (which is undefined/messy) into a DataFrame?

I am trying to understand how JSON data which is not parsed/extracted correctly can be converted into a (Pandas) DataFrame. I am using python (3.7.1) and have tried the usual way of reading the JSON ...
0
votes
0answers
8 views

How to display JSON informations in a ListView (django rest-framework)

I want to display JSON informations in an android app's ListView. I'm using Django Rest Framework , i already serialized my objects and converted the info to JSON format and are accessible via 127.0.0....
-1
votes
1answer
34 views

How to include JSON file/object inside C++ at build time

I have a JSON File with database environment configuration called env-config.json like this: { "LATEST":{ "DB_DATABASE":"databasename", "DB_HOST":"hosturl", "DB_PORT":"3306", "DB_USER":"root", "...
0
votes
0answers
34 views

How to invoke methods from reflection with a deserialized json object?

I have a collection of methods obtained through reflection, I know they return nothing and have a single parameter which implements a Request interface. I want to call these methods upon request but I ...
0
votes
0answers
17 views

how to fix Expected a string but was BEGIN_OBJECT on a nested array with retrofit

Hi guys i got a problem with Expected a string but was BEGIN_OBJECT i i cant find a solution been browsing for 2 days now , need help to fix this thanks im storing the json content on a DB but on my ...
0
votes
0answers
12 views

How to use generics and list of generics with json serialization in Dart?

I am developing a mobile project made with Flutter. This project need to connect to some servers for REST consumption services (GET, POST, PUT, DELETE, ...), and retrieve data as well as send data to ...
0
votes
1answer
16 views

Changing style in OpenLayers clustered features

I am using OpenLayers with Javascript and showing clustered features on map. I would like to change the icon of the feature within a cluster according to one of its attributes value. var style1 = ...
-3
votes
1answer
40 views

How can I delete a key from my JSON if its empty

I am trying to delete the key from js object if key doesn't have value inside of it. I have tried using delete foundBrief.Contents.url but not worked router.get("/:id/abcd.json", function(req, res)...
0
votes
2answers
19 views

No JSON Object could be decoded to missingkids website

I'm not sure why I am receiving this error. There is a decoder.py file in my python folder. import requests import json import common session = requests.Session() uri ="http://www.missingkids.com" ...
0
votes
0answers
14 views

Convert Json array into csv using Nifi

I'm looking to convert JSON with an array to csv format. The number of elements inside the array is dynamic for each row. I tried using this flow, ( attached the flow file xml on the post ). GetFile ...
1
vote
1answer
21 views

Trying to load json through Vue Axios

I'm trying to include a local JSON file from the static directory called blogs.json which has a load of blogs inside it. I'm currently loading the blogs via Vue Axios which is a module I'm including ...
-1
votes
1answer
38 views

Issues with Json

I have a json file which contains data and some garbage values. For example, {"user id": "1" "location":"1" "date":"3/22/2019"} {"user id": "2" "location":"2" "date":"3/22/2019"} {"user id": "3" "...
-1
votes
1answer
15 views

Generating Tree structure from Java Hashmap

I currently have a class with several attributes describing a certain type of object in my system. This class is known as EnrollmentInfo. I also have a hashmap that is structured as follows; HashMap&...
0
votes
0answers
22 views

Json to php encoding

I'm currently pulling data from an api that returns data in json. When i get this data I run it through my php code and write it to a database I have setup. The json data is stored in a php ...
0
votes
0answers
15 views

Is there a name for this JSON formatting pattern, with leading commas?

I have seen valid JSON written this way: { "version": 1 , "object": { "one": 1 , "two": 2 , "three": 3 , "four": 4, , "five": 5 } , "array": [ 1 , 2 , 3 ] , "people": [ { "...
0
votes
1answer
21 views

How to save new Django database entries to JSON?

The git repo for my Django app includes several .tsv files which contain the initial entries to populate my app's database. During app setup, these items are imported into the app's SQLite database. ...
0
votes
1answer
13 views

Encounter: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I got the json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) when I tried to access to the values from a json file I created. I ran the runfile below, and it seems that there was ...
0
votes
2answers
34 views

How to acces a nested json value when it has no key? [duplicate]

How can you access a nested json value when the value has no key? im trying to access the "2019-03-19T22:57:47.972Z" value of this json object: var json = {"metaData":[{"name":"ACTION_NAME"},{"name":...
0
votes
0answers
16 views

Passing a dynamic JSON into a react treeview (treebeard)

I am using a react-based treeview component (https://github.com/storybooks/react-treebeard) for a personal web app. The code pasted below is taken from Treebeard's example folder. The treeview gets ...
0
votes
0answers
3 views

How to show dialog window using JSON formatting SPO

I'm using custom column formatting (JSON) in Sharepoint online. When I apply custom format on lookup column it stops showing dialog window (with additional information) For better understanding, I ...
1
vote
1answer
42 views

Gson: JsonArray cannot be cast to JsonPrimitive error

I want to parse a json object containing dynamic field type using Gson: { "rows": [ { "id": "1", "interventions": [ { "type": "type1", ...
0
votes
0answers
8 views

Gson: Backslash displayed in output for String while converting from Java Object to JSON

I am using Gson to convert a Java Object to JSON. This is my Java object: private int phoneNumber; private String code; public int getPhoneNumber() { return phoneNumber; } ...
-1
votes
1answer
30 views

How to add variables to a JSON file? [on hold]

So I want to add myList into my JSON file under "names" list This is the python variable: myList ="Hello" This is the JSON file: { "names": [] }
0
votes
2answers
20 views

How to add an element into an array of a Serialize Field using Ruby on Rails

I have a field call query_data defined as text in my MySQL database. In my model I defined this field as serialize :query_data, JSON. The JSON format I would like to save and retrieve look like ...
0
votes
0answers
7 views

api-platform, JSON_CONTAINS, JSON_SEARCH

I am trying to search data in my database, in json document. This my json document stored in my mariadb database : {"type":"achat","secteurs":["06300","06200"],"budget":{"min":90000,"max":110000},"...
0
votes
0answers
7 views

Accessing optional fields using Asana Python API

I am trying to get additional fields when making a call through Asana's Python API Tasks.find_by_project(). My code for the call is: project_tasks = Tasks(self.client).find_by_project(project_gid, ...
0
votes
0answers
24 views

Auto populate a table from a json file

I have a basic table, that reads data from a json file to fill the rows This fill is updated by a 3rd party application, and I'd need to add new rows automatically, without the viewer having to ...
0
votes
0answers
19 views

Handling JSON data safely in JS and HTML context

I've read a lot about sanitizing and escaping of untrusted data, e.g. starting with this cheat sheet. But I didnt get the full picture yet. I am struggeling to understand, what principles I have to ...
0
votes
0answers
28 views

Stripping and renaming files

I have written some Python modifying existing code to run through some JSON files and strip out some text. The end result should be saving the now edited file with the same file name "- clean.json" at ...
-2
votes
1answer
16 views

How to split the multiple json objects present in a json array in Apache NiFi?

Example Input is below: I need to split JSON objects present in a JSON array into individual JSON files using Apache NiFi and publish it to a Kafka Topic. There are multiple JSON objects present in ...

http://mssss.yulina-kosm.ru