This tag can be used when you want to convert any text, objects or other formats into a JSON object,or if you want to transform a JSON object into something else.
Questions tagged [jsonconvert]
207 questions
0
votes
0 answers
C# Get request working with regular string but not serialized object
I am trying to send a GET request with a body using C#. I am able to send the request if I pass through a regular string however if I pass in a serialized object it does not work.
CallHttpGet Method
public string CallHttpGet(string url, string…

TheProgrammer
- 1,314
- 5
- 22
- 44
0
votes
1 answer
Can I append or manipulate XML in Azure Logic App?
I'm using a Logic App to Convert a JSON file to XML.
After the conversion I want to manipulate some of the XML elements to include certain text. Please see below code examples. Is this possible to achieve inside the logic app? Or do I need to…

DrejarN
- 13
- 3
0
votes
1 answer
Getting Json data from nested api response & show in a table
I'm getting the response from my API like-
0:
action: "Add"
date: "2021-09-22T00:00:00"
level: 1
module: "[Mode001]"
oldRecord: "{\"Code\": 7,\"Name\": \"F0002\",\"Type\": \"Feat}"
newRecord: "{\"Code\": 7,\"Name\": \"F0001\",\"Type\":…

XenDex
- 23
- 4
0
votes
0 answers
JsonConvert stops working when I make an object iterable
I'm making a class that holds data that is converted from a JSON file. It normally works when I use JsonConvert.DeserializeObject(text);, but when I try to make the class implement the IEnumerable interface, suddenly I got an error when…

lwashington27
- 320
- 2
- 14
0
votes
1 answer
Setting a boolean property from a 3rd party endpoint that returns a string
I am attempting to deserialize a json object using JsonConvert - the data is coming from a 3rd party API
return JsonConvert.DeserializeObject(content,
JsonSnakeCaseNameStrategySettings.Settings());
The…

Chris Rockwell
- 1,688
- 2
- 21
- 36
0
votes
1 answer
Unhandled exception. System.InvalidOperationException: The LINQ expression error by JsonConvert.Deserialize()
I get an error from this code:
var b = content.FormMasterLists.Where(x => x.FormMasterStatus == "pending");
var c = b.Where(x => JsonConvert.DeserializeObject(x.FormMasterApprovalCcb).Group.SelectMany(x => x.Department).SelectMany(x =>…

Chris Tuang
- 3
- 1
0
votes
0 answers
C# Client/Server tcp connection using StreamWriter and serialized with JsonConvert
I am trying to build a mere client/server tcp connection in C#
Here is the server code snippet:
try
{
var iPAddress = IPAddress.Parse("127.0.0.1");
var tcpListener = new TcpListener(iPAddress, 8001);
tcpListener.Start();
…

Cervelle
- 5
- 1
- 1
- 4
0
votes
0 answers
Date format switches when deserializing Json
I have a background process that fills a datatable. It works by retrieving a small amount of rows from an API in Json format and deserializing them to a datatable (loop). These rows are then added to another datatable which will contain all rows…

Alim
- 227
- 1
- 4
- 18
0
votes
2 answers
C# Deserialize Object
I have a web socket on my server and that sockets return list of player infos to the all clients. After I get the data from websocket ı cant deserilialize my data cause c# adding some '"' characters to my data. And ı cant remove that…

Sadullah DOĞAN
- 335
- 2
- 10
0
votes
0 answers
Crash when JsonConvert.DeserializeObject>
Error
An unhandled exception of type 'Newtonsoft.Json.JsonReaderException' occurred in System.Private.CoreLib.dll
Unexpected character encountered while parsing value: S. Path '', line 0, position 0.
The json
{
"Australia":"36",
…

Emanuel Rodriguez
- 13
- 4
0
votes
1 answer
How to assign two new key values in a JObject from a dictionary?
Hi I have below method which I calling in and that generates two string value(Partition Key and Row key). and My json do not have these two keys, so I would like to add these two values in my existing Json.
I need help in modifying my code below to…

ZZZSharePoint
- 1,163
- 1
- 19
- 54
0
votes
1 answer
How to convert JSON to XML using Integration Account or Liquid Templates in Azure Logic Apps?
Are there any concrete examples where a JSON file is converted to XML using an Integration Account? I specifically want to have influence over the the transformation so a direct @xml(..) is not an option.

Jay
- 189
- 4
- 12
0
votes
1 answer
JsonConvert Not working in Newtonsoft.Json Asp.net MVC C#
I'm using Newtonsoft.Json.JsonConvert but the error is as follows:
The type 'JsonConvert' exists in both 'Newtonsoft.Json,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and
'Newtonsoft.Json, Version=12.0.0.0,…

Mohammad Hasan Salmanian
- 197
- 4
- 20
0
votes
1 answer
ASP.NET MVC C# - Display class property names instead of the property names from JSON
I'm having difficulty after I Deserialize the JSON object I am getting from an API using JsonPropertyAttribute
I successfully get the value from the JSON object
{
"property name": "property value"
}
but my problem is, instead of the class…

aj go
- 637
- 2
- 10
- 27
0
votes
1 answer
Manipulating a Json string from within a custom Json Converter
In order to ask my question, I will be referring to @Brian Rogers 's answer here.
In this answer ReadJson is doing something relatively simple. How could I however add a layer in there in order to manipulate the incoming Json string before…

stackMeUp
- 161
- 7