json Questions

3

Solved

Valid json expects escaped newline characters to be encoded as '\\n', with two backslashes. I have data that contains newline characters that I want to save to a file. Here's a simplified version: ...
Interchangeable asked 3/7, 2015 at 9:27

6

I am trying to load a json file in my Jupyter Notebook import numpy as np import pandas as pd import seaborn as sns import matplotlib as plt import json %matplotlib inline with open("pud.json...
Fireboat asked 2/6, 2018 at 5:57

5

Solved

I would like to send a POST from MQL4-script, using a JSON-format to a Node-server. I've tried the webRequest() standard function in MQL4, based on the following documentation, but it did NOT succ...
Allottee asked 10/10, 2016 at 8:28

3

I have this tree of objects A B extends A C extends B D extends B E extends C F extends A and has one reference to A A has the following annotation @JsonTypeInfo(use=JsonTypeInfo.Id.CLASS,i...
Sculpt asked 5/4, 2013 at 12:27

5

Solved

I have the following declaration in my object: @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX") private ZonedDateTime start; And when I parse timestamps like ...
Maestricht asked 8/12, 2016 at 10:32

3

Solved

I'm getting some unexpected behavior with json.dump(). I'm creating a file results(empty), and then using it in the code like this: with open(results, 'r+') as fp: temp = {} try: # file not em...
Keepsake asked 17/2, 2017 at 12:1

4

I'm new to json and trying to get a basic example working. My http request returns {'username': '1'},{'username': '1'}. I'm confused as to what valid json looks like but also how to get it into...
Begrime asked 9/8, 2016 at 17:23

5

Solved

I'm trying to test a method that uses net/http to make requests. Specifically what I'm trying to achieve is to inject a mock http.Client that responds with a certain JSON body type clientMock stru...
Arieariel asked 22/11, 2017 at 13:43

3

Solved

I'm working with a json file in Python and I wanted to convert it into a dict. This is what my file looks like: [ { "label": "Label", "path": "/label-path&quot...
Bala asked 8/10, 2020 at 18:26

5

Solved

In a web service implemented in Go, I want to be able to restrict fields returned in a JSON response based on a user's role. For example I may have a currently logged in user who has a role of gue...
Necker asked 3/4, 2014 at 11:13

3

Solved

In my current project I have the problem that I end up in an infinite loop when trying to convert an Item or any of its subclasses like ArmorItem. To detect which type of Item I have to deserialize...
Scroop asked 25/9, 2015 at 13:56

3

Solved

I've a POJO with Jackson annotations public class Sample{ private String property1; @JsonIgnore private String property2; //...setters getters } So, when Jackson library is used for au...
Blackout asked 28/7, 2015 at 14:58

3

Solved

In Spring 3.3 I have an entity which is mapped to a database table. In this entity class I have all properies annotated with @JsonProperty, for instance @JsonProperty("ID"). Stepping into the cont...
Lookthrough asked 25/9, 2013 at 20:7

4

Solved

I'm trying to make a website that asks for the user's location, then finds the closest location (100m radius) from their position using GeoLocation and displays the result in HTML. What I have trie...
Amary asked 13/8, 2018 at 9:29

2

Solved

I'm having a strange problem with Visual Studio Code. I have the following JSON file that has a problem: { "attribute": "// numeroConta", "operator": "=",...
Tenet asked 13/1, 2021 at 20:42

3

Solved

In jq, I can select an item in a list fairly easily: $ echo '["a","b","c","d","e"]' | jq '.[] | select(. == ("a","c"))' Or if you prefer to get it as an array: $ echo '["a","b","c","d","e"]' | ...
Penney asked 15/6, 2017 at 8:56

6

Solved

I have a JSON file that contains HTML elements in a string - Is it possible to return the data in React/JSX as valid rendered HTML? var Hello = React.createClass({ render: function() { var examp...
Joijoice asked 28/1, 2016 at 6:21

2

Solved

How to configure VS Code launch.json for C++ development under Linux? The official documentation does not provide a launch.json sampleofficial documentation for WSL. Unfortunately, I can not get a ...
Irina asked 1/6, 2019 at 11:25

4

Solved

My JSON file resembles this { "active" : false, "list1" : ["A", "B", "C"], "objList" : [ { "key1" : "value1", "key2" : [ 0, 1 ] } ] } Using nlohmann json now, I've managed to store it an...
Thea asked 29/6, 2016 at 12:18

3

I made a Chrome Extension and used Firebase to collect data into a database. It worked fine for some time, but it seems there were some changes to Chrome. Now I get the following error in the javas...

2

Solved

We need to use a custom unmarshaler for a struct nested in multiple other structs which don't require a custom unmarshaler. We have lots of structs similar to B struct defined below (similar as in ...
Disney asked 12/9, 2018 at 11:24

3

I'm trying to use Jquery/AJAX/JSON with a CFC to send an email (easy right?) After spending many hours trying to find one complete example of how this should work, I'm getting close but am stuck on...
Destructible asked 10/4, 2016 at 1:23

3

I want to generate JSON from TOML files. The JSON structure should be something like this, with arrays of objects within arrays of objects: { "things": [ { "a": "thing1&...
Snot asked 26/2, 2018 at 22:18

5

Solved

Essentially, I am trying to run a query on a MySQL database, get the data made converted into JSON and sent back to the client. I have tried several methods and all of the "easy" ones result in sen...
Piotrowski asked 13/3, 2017 at 22:19

3

Solved

I was reading this w3c document about post JSON data with html form, and trying to test it. my test form is as follows: <form action="postjson.php" method="POST" enctype="application/json"&gt...
Gorgerin asked 24/6, 2016 at 15:36

© 2022 - 2024 — McMap. All rights reserved.