Questions tagged [linq-to-json]

An API to work with JSON objects.

Linq to JSON is part of the Newtonsoft.Json.Linq Namespace. It has been designed to with Linq to enable the querying and creation of JSON objects easily.

38 questions
0
votes
2 answers

LINQ to JSON - Newtonsoft.Json.Linq.JProperty Error

The following is my json string: string json = @"{ '?xml' : { '@version' : '1.0', '@encoding' : 'UTF-8' }, 'DataFeed' : { '@FeedName' : 'AdminData', 'Issuer' : { 'id' : '95', 'name'…
inquisitive_one
  • 1,465
  • 7
  • 32
  • 56
0
votes
3 answers

Multiple table join using lambda/linq c# with DTO

This really has me stumped. I have four tables in the database, and unfortunately the person who designed this table didn't create referential constraints. So, there is no navigation properties available. Four tables are:…
user1828605
  • 1,723
  • 1
  • 24
  • 63
0
votes
1 answer

Error when parsing JSON from file to class with Newtonsoft

I'm trying to read file data and then pass its to the class for further processing. As I can see obj accepting data but then I got error: Value cannot be null. Parameter name: source Here is the code: var url =…
andrey.shedko
  • 3,128
  • 10
  • 61
  • 121
0
votes
1 answer

How to check specified children name included in Parent on JArray with Linq query

I have as same as following Json data "widget": { "debug": "on", "window": { "title": "Sample Konfabulator Widget", "name": "main_window", "width": 500, "height": 500 }, …
Tayfur Yılmaz
  • 21
  • 1
  • 11
-1
votes
1 answer

How can i combine anonymous types with LINQ to JSON?

consider the following json file { "test": { "CR": { "name": "Car" }, "BK": { "name": "Bike" } } How can i combine usage of anonymous types with LINQ to JSON for creating key-value pairs of CR Car BK Bike by…
OrElse
  • 9,709
  • 39
  • 140
  • 253
-1
votes
1 answer

Retrieve an inner array value relative to a specified inner array property value paired with a specified outer array property value

Based on the validated JSON below: { "GrowthRates": [{ "FinancialStatementHeader": { "TimePeriodText": { "attrCodeValue": 11096, "txt": "Between 0 and 12 months" …
VVA
  • 3
  • 2
-1
votes
1 answer

how to filter json data using ling to json query

I'm new to json. I have to filter json data using linq to json query in C#.I have to retrieve multiple values from the below sample json data: { "parts": [ { "attributes": { "Motherboard": "Gigabyte GA-H81M-S2H", "Max…
Rajesh
  • 55
  • 2
  • 11
-2
votes
2 answers

LINQ to JSON - SelectToken Error

This is the JSON string that I am working with. string jsonText = "{ "?xml" : { "@version" : "1.0", "@encoding" : "UTF-8", "@standalone" : "yes" }, "Grid" : { "DataRow" : [{ "DataItem" :…
inquisitive_one
  • 1,465
  • 7
  • 32
  • 56
1 2
3