Can't Parse Json

I am trying to send a JSON to a REST controller, written in Spring, and no matter what I have tried - the Jackson throw an exception: org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Illegal character ((CT...
more »

2017-05-14 21:05 (2) Answers

Use youtube api to get video list with swift 3

I would like to get back the title, id of the videos of a channel for but I block at the level of the JSON. It effect, when I try to make MYJSONARRAY ["items"] [0], nothing displays:/ Thank you for your help :) let url = URL(string: "https://www.goo...
more »

2017-05-14 20:05 (1) Answers

Angular 2 Route Mapping via JSON

Service: export class ArticlesService { private _url = 'https://example.firebaseio.com/.json'; constructor(private _http: Http) { } getAllArticles(): Observable<any> { return this._http.get(this._url) .map((response: Respon...
more »

2017-05-14 20:05 (1) Answers

Newtonsoft read array in C#

I'm trying to get an entry of a json array into a messagebox but i can't seem to get the entry it always gives me Newtonsoft.Json.JsonReaderException: 'Unexpected character encountered while parsing value: C. Path '', line 0, position 0.' No ma...
more »

2017-05-14 16:05 (2) Answers

Treating "N/A" value as null with Jackson

I am getting data from an external JSON API and parsing the result with Jackson. Unfortunately, that API returns all fields as String and those are filled with "N/A" when data is unavailable. I would like to replace those fields with null, especiall...
more »

2017-05-14 15:05 (1) Answers

Django templates using JSON

Now, I'm using Django to create a website. In order to use JSON in HTML, I made it to response JSON to template. But when I use JSON data in HTML, The data hasn't appear. Here is my code: views.py def json_data(request): data = words.objects...
more »

2017-05-14 13:05 (1) Answers

ConstraintLayout content shape changed if scrolled

I used constarintLayout as a container for my recycleView, And i fill my items by depend on json (Retrieved data). So i makes some tricks here, If my retrieved json contain a specific value i have to make some items in my constraint layout to disap...
more »

2017-05-14 09:05 (0) Answers

Angular2 http get request returns html

I'm trying to send this test data from my node js server to front end. router.get('/abc', (req, res) => { return res.json({ test: "success!" }); }); In my service component: private url = "http://localhost:4200/auth/abc"; getTitles() {...
more »

2017-05-13 02:05 (1) Answers

PHP: XML to JSON fails to convert

I am using the following function to convert XML to Json: function XMLtoJSON($xml) { $xml = file_get_contents($xml); // gets XML content from file $xml = str_replace(array("\n", "\r", "\t"), '', $xml); // removes ne...
more »

2017-05-13 01:05 (0) Answers

C# Json Interface Serialization

is there someone who can help me with the serialization of IList<IShows>. I managed to serialize it with help of JsonConvert.SerializeObject but ... Let's say I have classes like: public class Show : IShow { public string Name { get; set; ...
more »

2017-05-13 00:05 (1) Answers

Error in reading objects from jQuery Array

I am trying to create an array and add data to the beginning of it. Then with a for loop I print out all the data. However, it prints an error, as Uncaught TypeError: Cannot read property 'title' of undefined. var coords=new Array(); coords.u...
more »

2017-05-13 00:05 (2) Answers

Jackson: Use default (de)serializer

I'm trying to (de)serialize an object that has a property with a type that comes from a maven dependency, so I can't change the class of this type. The class of this type has a @JsonSerialize and @JsonDeserialize annotation. However, I want to use ...
more »

2017-05-12 14:05 (1) Answers

Jackson won't find my module

I'm trying to make Jackson autodetect my Serializers, bundled in an external JAR, instead of registering them on an ObjectMapper. Here is what I do. First, my serializer: public class LocalizedStringJacksonSerializer extends StdSerializer<Locali...
more »

2017-05-12 14:05 (0) Answers

createUiDefinition.json for ARM Azure web app

I have created the ARM template for azure web app. I need to publish the ARM template to azure market place. I have used the azure publish portal https://publish.windowsazure.com/workspace/multi-resource-solutions for publishing the ARM template. T...
more »

2017-05-12 07:05 (0) Answers

Return request response in angularJs

I've setup a controller and service to grab some JSON from my own NodeJS API/MongoDB endpoint. In my browser console I see a returned object and 5 items and when I query my api I see the same json in the browser, so I know it's working on the server...
more »

2017-05-11 16:05 (2) Answers

How to override Jackson serializer

I have a default serializer assigned to a class: @JsonSerialize(using = DefaultCustomSerializer.class) class X { } I want to disable it in some cases. So I defined 2 ObjectMappers, one of these mappers registers another serializer. objectMapper....
more »

2017-05-11 16:05 (0) Answers

Is "[]" valid JSON?

I'm having troubles de-serializing this JSON string using JSON.NET (note the quotes): "[]" Depending on which JSON validation website you go to, this is valid JSON (jsonlint for example says it is). The JSON.NET code: void Main() { string j...
more »

2017-05-11 11:05 (2) Answers