Questions tagged as 'json.net'

3
answers

Deserialize JSON Array in an Object Array

Good afternoon, I decided to ask because I have been caught in this for 3 days and no matter how much I have searched, I have not found a solution to my problem. Access a Web Service via C #, HttpClient, and get a Json in the following format:...
asked by 29.01.2016 / 18:44
3
answers

Creating a List from a Json C #

I have a question regarding JSON, I have the following JSON: { "jsonrpc":"2.0", "result":{ "nr":26, "lista":[ { "codigo":"2", "nome":"Pratos Quentes", "foto":"./images/cupcake.png" }, {...
asked by 20.04.2017 / 22:39
1
answer

How to read a struct inside another with Json.Net?

I need the program to read this information:    {"kiseryota": {"id": 15031780, "name": "Kise Ryota", "profileIconId": 1374, "summonerLevel": 30, "revisionDate": 1475089675000}} I'm doing this: Structure: public struct SummonerInfo0 {...
asked by 29.09.2016 / 02:13
2
answers

Json Array for String Array C #

I just need to get the names of the json moderators and viewers: { "_links": {}, "chatter_count": 16, "chatters": { "moderators": ["gumagames", "juliavidoto", "nightbot", "pinkpanthersz_", "victoriia66"], "staff": [], "admins...
asked by 01.03.2016 / 22:05
1
answer

How to add a certain value to an Integer of a JSON in vb.net?

Hello, I have this code: Imports System.IO Imports Newtonsoft.Json.Linq Public Class Form1 Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim channel As JObject = JObject.Parse(Fil...
asked by 04.09.2018 / 03:48
2
answers

How to insert data with JSON and MVC5

I have a registration screen where the user can enter as many emails as he wants in each record. For this, in my View I have the following code <div class="form-group"> <button type="button" id="btnAddEmail">Adicionar</b...
asked by 21.08.2017 / 22:28
1
answer

Help in VB.NET using Newtonsoft.Json

Hello, I have this code: Imports System.IO Imports Newtonsoft.Json.Linq Public Class Form1 Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim channel As JObject = JObject.Parse(File.ReadAllText("C:\s...
asked by 04.09.2018 / 01:44
1
answer

Map class with json.net

Is there any way to map the properties of a class without using annotation JsonProperty of Json.NET The following structure shows two classes that inherit from the Bar class. However, the json name of the parent property (Bar) sho...
asked by 05.05.2016 / 20:14
1
answer

How to ignore an error using Json.NET without damaging what has already been read

Is there any way to continue "deserializing" an object using Json.NET , even when a property is corrupted and without damaging the which has already been "read"?     
asked by 26.01.2016 / 02:58
1
answer

Deserialize to an ICollection without the need to create an extra class

Hello. I am using Json.NET to deserialize my object. Today I do the following: JsonConvert.DeserializeObject<ICollection<TModelo>>(stream.ReadToEnd()); Currently I have to create an extra class ( Produtos ) because...
asked by 26.12.2017 / 19:11