Click here to Skip to main content
15,889,931 members
Everything / JSON

JSON

JSON

Great Reads

by Ajcek84
Open source library for music engraving in desktop, mobile and web applications
by Robert_Dyball
Add JSON Web Token Authentication (JWT) using OpenIDDict to our ASP.NET Core + Angular 2 SPA. Source includes VS2015 and VS2017 versions.
by wmjordan
This is a fork of "fastJSON" with new power to control many aspects in JSON serialization and deserialization, such as, serializing interface instances (polymorphic serialization) and private types, including or excluding members, performing data conversions, conditional serialization, etc.
by dnxit
MVC .NET Core 3.1 Dynamic Role based authorization using Authorization Handler & Custom Authorize Policy

Latest Articles

by honey the codewitch
Implementing a simple JSON parser with Visual FA
by honey the codewitch
Generate a web browsable interface to your archived TV show content
by honey the codewitch
If you're putting together templates or other messes using JSON and C# this may be the ticket for you.
by honey the codewitch
Stream JSON efficiently on little devices with minimal flash and memory usage

All Articles

Sort by Updated

JSON 

8 Nov 2016 by #realJSOP
Use the newtonsoft json library. It's available in Nuget. Lots of people using it, so a google search for specific issues will yield a plethora of possible solutions.BTW, this very same question WITH THE VERY SAME DATA came up a week or so ago. After a cursory search, this appears to be a...
9 Jan 2017 by #realJSOP
3 Ways to Convert DataTable to JSON String in ASP.NET C#[^]
25 May 2018 by #realJSOP
Have you tried json.net? It lets you do this: string json = JsonConvert.SerializeObject(dataSet, Formatting.Indented); Seriously, google is your friend.
22 Oct 2018 by #realJSOP
Why don't you just use DataTable.ReadXML(). At that point, it would be MUCH easier to get the data into a SQL Server database. For info, on that, go here: Google[^]
28 Mar 2019 by #realJSOP
Google (or in my case, DuckDuckGo) is FULL of links: json to datatable at DuckDuckGo[^]
18 Oct 2019 by #realJSOP
Try this (no guarantees): DataSet ds = JsonConvert.DeserializeObject(json); DataTable dt = ds.Tables[0]; FileHelpers.CsvEngine.DataTableToCsv(dt, filename);
2 Dec 2019 by #realJSOP
Seriously? You can't find any info about it on google?
4 Apr 2020 by #realJSOP
0) Don't post stuff on imgur that can easily be posted here. 1) You can't create json without data in your objects. 2) Your model isn't complete. There is no AtlasTransaction object defined in your example code 3) Why are you serializing it...
26 Jun 2020 by #realJSOP
attemping to deserialize Jason to a model object will throw an exception if thedesrialization can’t be performed. Why can’t you just put a try/catch block around the deserialization code and let nature take its course?
1 Mar 2021 by #realJSOP
I googled it and this was the first result returned: Format Nested JSON Output with PATH Mode - SQL Server | Microsoft Docs[^] My search results are here: sql server nested json at DuckDuckGo[^]
22 Jul 2021 by #realJSOP
It would be much simpler and faster if you parsed the entire block of json data into known entities (in other words, you have to define them so you can correctly parse the json data), and then used Linq to "flatten" your data. It looks like you...
24 Sep 2013 by $*Developer - Vaibhav*$
Hi All, Convert XML string to Array but array is array item within item 1 SDM SDM78@gmail.com #4169e1 10010000 XYZ...
25 Sep 2013 by $*Developer - Vaibhav*$
Using parseJSONvar obj = jQuery.parseJSON( '{ "name": "John" }' );alert( obj.name === "John" );
1 Jun 2016 by .net developer123456789
Here working code Create JSON file for Desktop application :-private void GenerateJSONFile(List WorkList) { string jsonString = ""; JsonSerializerSettings J = new JsonSerializerSettings(); J.NullValueHandling =...
8 Feb 2016 by .net333
Hi, I need to get Json response in wcf service. Xml Request and Response working properly. but i need to change same xml request and response to Json.Please help me to get the Json responseThanksWhat I have tried:[ServiceContract] public interface IManageService {...
11 Feb 2016 by .net333
Hi friends, public interface IDriverService { [OperationContract] [WebInvoke(UriTemplate = "GetData", Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] List GetData(GetDriverRequest...
17 Feb 2016 by .net333
Finally i got Json Response. The problem is with date time. Now it was solvedIssue: DateTime.MinValue not be serialized in timezones ahead of UTCSolution :[DataMember(IsRequired = false, EmitDefaultValue = false)]Added this on any DateTime Member
17 Feb 2016 by .net333
Finally i got Json Response. The problem is with date time. Now it was solvedIssue: DateTime.MinValue not be serialized in timezones ahead of UTCSolution :[DataMember(IsRequired = false, EmitDefaultValue = false)]Added this on any DateTime Member.
24 Nov 2014 by /\jmot
here is the way..http://stackoverflow.com/questions/15905248/is-there-a-way-to-call-a-non-static-method-from-a-static-method[^]https://social.msdn.microsoft.com/Forums/en-US/5bf25ef7-c158-496d-aac9-fe3dd4ba99a8/how-to-call-a-nonstatic-method-from-a-static-method?forum=csharplanguage[^]
13 Apr 2013 by 1100Neo
I am developing an application in java from the rotten tomatoes api which uses json format. All I need to know is how can I write to a JSON url and read from a JSON url. Thanks in advance.
13 Apr 2013 by 1100Neo
I searched and found this, but it seems very difficult to understand , as I am new to JAVA.http://argo.sourceforge.net/documentation.html[^]
16 Dec 2015 by 1Future
Hi, i am just learning web Apis in ASP.Net ... I getting the hang of it so far and my mini projects are working well. I was just wondering if someone would explain to me why we have to declare [ResponseType(typeof(myTable))] above every IHttpAction result? and also what that does.Thank you.
21 Dec 2015 by 7045Jeegnesh
Try thisvar getCountries1 = function () {var coutries; $.ajax({ url: "http://www.geonames.org/childrenJSON?geonameId=6255150", type: "post", asyn: true, success: function (data) { countries = data; ...
30 Nov 2013 by 78ATI
Hi,I am trying to convert a list to a json sting, that contains a series of Chinese characters. But instead of seeing the actual Chinese text, I am seeing [???]. Is there a way to avoid that?Thank you.
17 Dec 2014 by 875ewh84
I have developed by own grader for Xqueue(edX). It is a C compiler that pulls json objects from the Xqueue and pushes the results back into the Xqueue.I am returning a JSON response in the format expected (given below){ "correct": true, "score": 1, "msg": "The code passed all...
23 May 2012 by __Untitled
I have a web service, the client program can post a key to one of its web method, and the method will return {"key-client-post", "value-from-server-side"}, the structure of return string is fixed, but the key name is dynamic, it depends on the client program.My question is how I can...
13 Jan 2022 by _Asif_
you are receiving XML as response instead of JSON that is why following line is giving exception. JSONObject jsonObject = new JSONObject(response); You need to change these two lines JSONObject jsonObject = new JSONObject(response);...
26 Oct 2015 by _Hariom_Singh
USE GET METHOD OF JQUERY ON SELECT CHANGE OF THE DROPDOWNLIST
26 Mar 2014 by _jarvis
Krunal,Try this : var result = data.GetEmployeeJSONResult;var id = result.Id;var name = result.Name;var salary = result.Salary;Or if you want to directly alert try this : alert(data.GetEmployeeJSONResult.Id);You need to understand how JSON works. Comparing the JSON data...
21 Dec 2012 by _Vitor Garcia_
I just googled and found thisSome code is in c#, but i hope it could help you.
22 Mar 2022 by A-Games
I’m trying to get this JSON from my server: [{"name":"Tie-Dye T-Shirt","type":"tie-dye","price":7.99},{"name":"Art1","type":"painting","price":13.99},{"name":"Hand-Made...
27 Feb 2013 by A. S. M. Abdur Rab
I have updated the function array_to_xml. Hope it will solve your problem:function array_to_xml($template_info, &$xml_template_info) { foreach($template_info as $key => $value) { if(is_array($value)) { if(!is_numeric($key)){ ...
24 Sep 2019 by A_Griffin
You may want to look at the receiver function in JSON.parse - for a trvial example, to get the time zone in your example var json = '{"Meta Data": {"1. Information": "Daily Prices (open, high, low, close) and Volumes","2. Symbol": "MSFT","3. Last Refreshed": "2019-09-24","4. Output...
13 Aug 2012 by A_sachin
hi,I am trying to create json enabled wcf services with entity framework 4.0.when i return the response in XML format using [WebInvoke(Method = "GET", UriTemplate = "/getStudents", BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Xml, ResponseFormat =...
14 Aug 2012 by A_sachin
hi i got the solution for my problem...i just need to make some changes in web.config file for my endpoint behavior...and now it is working well...Thnks for your consideration..and in order to serialize the list() into Json i used JavaScriptSerializer public string...
2 Jul 2013 by a_sof2008@yahoo.com
learn full mvc4 C# by json.......
15 Jan 2021 by AasifAha
I am building a weather displaying android application with the api of openweather.org api key. I have written some basic logic to display the weather details of a related city when the user searches the city So the error i am facing is as...
24 Mar 2015 by abdul subhan mohammed
Hi guys,i have asp.net web site,where i'm fetching data in JSon Format.for which i have created a class..using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace BusinessLayer{ public class Outlet { ...
25 May 2015 by abdul subhan mohammed
Hope you want to call json from your aspx page. if it so, then use this code. function GetDescription(a) { // alert(a); // the dropdown item selected value $.ajax({ type: 'POST', contentType: "application/json;...
2 Jun 2015 by abdul subhan mohammed
Hi guys,i have asp.net website,where i'm using jqxgrid to bind data from a html table,I have one add button in this table and i'm calling this ADD2Grid().Code: function ADD2Grid() { //Getting the source data with ajax GET...
3 Jun 2015 by abdul subhan mohammed
Hi guys,I have website in asp.net in which i'm using JQuery jqxGrid to bind data.And successfully i bind the data.In JqxGrid i have edit option also.Now, i want to save all the data in SQL SERVER 2008 R2.Code tried so far: ...
27 Nov 2017 by abdul subhan mohammed
Dear All, I have one class public class myPracticeInfo { public long CandidateID { get; set; } public long CandidateCertificateID { get; set; } public long CandidateCertificateModuleID { get; set; } ...
18 Feb 2022 by abdul subhan mohammed
Hi guys, I have created one google chrome extension to get key pressed values from active tab. Key Logger ...
19 Jul 2015 by Abdullah Gul
//Her is the markup and belove it is the Jquery code
27 Jun 2012 by Abhijit Barua
sir, i try lots. we can bind asp.net gridview many ways but datalist i not able to bind. plz give me suggestion how can i bind asp.net datalist using jquery/json and webservice.
27 Jun 2012 by Abhijit Barua
sir, when i am going to bind datalist using jquery/json and webservice, i got cssclass for label i have to write to bind datalist. but i have not any knowledge. plz help me.
19 Oct 2014 by Abhijit Ghosh (Subho)
This is an alternative for "Creating a Issue in Jira using Rest API". This is an upgraded version as it contains a way of sending attachments with the issue. This version doesn't use MSXML as it is not recommended by Microsoft.
14 Mar 2017 by Abhilash.J.A
Inside html view page there is two div.
22 Feb 2012 by Abhinav S
You have not posted any code here, but basically, you would need to include a closing , or } tag at the end of your line of code.
27 Nov 2013 by Abhinav S
There are a couple of ways you could explore.Try JavaScriptSerializer and return JSON as string.Or deserializer using DataContractJsonSerializer - http://msdn.microsoft.com/en-us/library/bb412179%28v=vs.110%29.aspx[^].
1 Dec 2013 by Abhinav S
Its best to use unicode encoding - http://tools.ietf.org/html/rfc4627#section-3[^].
1 Apr 2014 by Abhinav S
Some more links -JSON ASP.NET Web Services with jQuery[^]How To Create A JSON Web Service In ASP.NET[^]Returning JSON from a .Net 4.0 web service[^]
27 Aug 2014 by Abhinav S
Null is a reserved value in JSON.So you can set the file to [] rather than [null].
25 Nov 2014 by Abhinav S
Tryvar search = _.filter(_.keys(data), function (key) { var obj = data[key]; return _.every(query, function (val, queryKey) { return ref(obj, queryKey) === val; });});
8 Apr 2015 by Abhinav S
Try var json = JSON.parse(data);alert(json["prop1"]);
18 Apr 2015 by Abhinav S
If you are using JQuery, you can do a loop$.each(json, function(i, v) { if (v.empid == mySearchString) { //Do stuff } });
29 Jul 2015 by Abhinav S
Convert this JSON to an array and send it over.For example - JSON Array: Passing Array Objects in Your Web Apps[^].
20 Sep 2015 by Abhinav S
You will build a user interface in html and then store data from this website into the database using some sort of service (REST or SOAP).In the Microsoft world, REST service can be a WebAPI or an MVC controller. Both provide options to save into the database.ASP.Net MVCASP.NET...
10 Nov 2015 by Abhinav S
TryCapture a Screenshot of a Div with JavaScript[^]Take Screenshot of Web Page and Save It to Server [^]
10 Nov 2015 by Abhinav S
Try these links -Calling ASP.NET WebAPI using HttpClient[^]Calling a Web API From a .NET Client in ASP.NET Web API 2 (C#)[^]Using HttpClient to Consume ASP.NET Web API REST Services[^]
2 Feb 2016 by Abhishek Burrnwal
I am export data into dbf format in asp.net. It's workine fine in 32 bit machine. But it's not working in 64 bit machine Why?Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine Error in 64 bit machine. While I have installed this AccessDatabaseEngine_x64 in 64 bit...
21 Feb 2017 by abhishek goutam
Hi all,i have a problem . I am working with workwave API problem that i am not understanding how can i resolve this is 1> how can i create a callback url ?2> How can i get data from workwave to there ?please help me about this. thanks for your valuable answer.What I have...
17 Aug 2014 by Abhishek Jaiswall
Hello!I want to convert my SQL server table data into JSON format, please suggest how to do that?:)
18 Aug 2014 by Abhishek Jaiswall
Please help me in this-how to convert JSON data in creating D3Js bar charts, suppose my Json data is[i want C# code][{"Name" : "A","Salary" : "12K"},{"Name" : "B","Salary" : "5K"},{"Name" : "C","Salary" : "9K"},{"Name" : "D","Salary" :...
28 Dec 2016 by abhishekchadha
what is the best criteria to search a product by name,brand,product code and a keyword in c# for proper ecommerce website .What I have tried:i try using json a web method called and the results return but it takes a little more time to search.i want fast search. what is the better way...
11 Jun 2015 by AbhishekDotNet
Hello Friends,I am trying to learn Kendo UI control and Hence try to Implement a Kendo Grid.my Code is:Index.cshtml @(Html.Kendo().Grid() .Name("EmployeeKendoGrid") .Columns(c => { ...
2 May 2012 by Abid A
I` a newbie and want to clear my few misunderstandings..i want to know that what is the best and the worst practices that we can perform with JSON.can we use json for navigation bar? can we use json for binding the dropdowns or grid?in which context is json usefull from XML? i have these...
12 Oct 2022 by abimjoshi7
I am working with an expansion tile in a flutter that shows user information in an irregular hierarchical order. I am optimizing the code to increase the performance of the expansion tile widget. Unit-III hierarchy differs from the rest and I am...
28 Oct 2022 by Abishek Samuel
I need to access the second column directly or iteratively. ```[ { "Player_no": 2, "player_name": "Warner", "team": "Aus", "age": 33 }, { "Player_no": 3, "player_name": "virat", "team": "India", "age": 30 ...
5 May 2015 by abrchaves
Hello everybody,I tried to pass an object variable to Newtonsoft.Json.JsonConvert.DeserializeObject, and I know you only can pass string variables, anyone knows what is the way to convert the next value storage in my object...
8 Sep 2015 by AbubakerIT
Alsalaam Aleykum.All you have to do is to respond to the error. I mean change the date format so the json can parse it to the web service.your code should look like this:var o = new Object();o.Price = "56";o.Reason = "Tea";var followupDate = "17-12-2013";o.Date = new...
23 Mar 2015 by Accusoft, Ned Averill-Snell
Watermarking in an HTML5 viewer allows sharing sensitive document content while curbing the potential for unauthorized use. This paper shows how the application of JSON properties in the body of an HTTP viewing session request can be used to apply watermarking to a document.
27 May 2016 by Accusoft
One of the new additions to our recent PrizmDoc v11.0 release was a developer preview of our document pre-conversion feature. In this article, first we’ll give a quick PrizmDoc overview, and then cover how to get started with pre-conversion.
31 Mar 2015 by Adam R Harris
Hey All,I have a really strange issue that I can't seem to track down. I am posting small JSON objects to a webservice and getting back large JSON objects represented as strings. The problem I'm having is that randomly in the JSON object that is returned I get the following text: DNT:...
13 Nov 2015 by AdamDedanga
Hello,I have a MySQL-table looking like this:Year|ZIP Code|Causes of Death|Count|Location1999|90001 |SUI |0 |(33.973092999999999, -118.247896)... |And I need to create JSON data which looks like thisvar data = [ [ 'seriesA', [ latitude,...
12 Dec 2015 by AdamDedanga
You find the JSON-file here: drydo.com/crawler/files/json/data.jsonScroll to the bottom of the JSON-file to find the data structure. Go back up in the file and look for position to find the column labels.This is the code I've done so far. I began to write in Javascript, although I...
11 Oct 2019 by adhikar patil
Hello, I want to read json file data with specific json object array one by one using Foreach loop and insert into database in Asp.net Core. I Have MasterData.json file { "M203StructureKind": [ { "Code": "1", "Description": "BRIDGE" }, { "Code": "2", "Description": "CULVERT" }, {...
15 Oct 2019 by adhikar patil
Hello, I want to read json file data with specific json object array and insert bulk data into database in Asp.net Core. I have two tables in Databse like naming as M203StructureKind, FlhDivision CREATE TABLE [dbo].[M203StructureKind]( [Id] [int] IDENTITY(1,1) NOT NULL, [Code]...
17 Oct 2019 by adhikar patil
Hello, I want to convert Json object to DataTable. I have json file to insert bulk data into table using SqlBulkCopy string contentRootPath = _appSettings.MasterJsonPath; var folderDetails = Path.Combine(Directory.GetCurrentDirectory(),$"wwwroot\\{"MasterData\\masterdata.json"}"); ...
20 Sep 2015 by Aditya_Goud
I have the following response from my server now i need to parse this and place into a dictionary as Key/ValueEx:Key: 1Value: Andhrapradesh [{"stateid":"1","statename":"AndhraPradesh"},{"stateid":"2","statename":"Arunachal...
7 May 2020 by AFell2
The most important thing you need to do is prepopulate your string array with values. You can do this with the constructor to your class, like so: public class User { [JsonProperty("username")] public string Username { get; set; } ...
30 Mar 2012 by Afshin Mehrabani
In this article we are going to review a piece of NodeJS code and learn how to use some of its common modules. This is a simple application which keeps record of logs including errors, warnings and information.
6 Oct 2016 by Aftab Ahmed Sajid
The simplest way to return json objects to client using struts 1
1 Oct 2010 by After2050
This article demonstrates how to create public and private members in JavaScript through a sample.
2 Jul 2014 by Afzaal Ahmad Zeeshan
You already have it done! If you just want to remove that one particular text part. You can use this simple method too.// ignore this part.xmlns="http://tempuri.org/"// String stringContent = "JsonResultAsStringHere";String newString =...
27 Dec 2014 by Afzaal Ahmad Zeeshan
You can try using the Newtonsoft.JSON[^] API to deserialize this JSON syntax to an object. That would be converted into an anonymous object, to make sure you get an object that you know how to extract data from. Please create the classes created inside this website,...
4 May 2015 by Afzaal Ahmad Zeeshan
I will continue from your statement, Quote:this works if i set asp.net framework as 3.5 but after setting it to 2.0 its not workingYou need to know that the version you are trying to refer to is .NET framework version and not the ASP.NET version. ASP.NET requires .NET framework to run over,...
21 Jun 2016 by Afzaal Ahmad Zeeshan
Your data is already in string notation, there is no need to stringify it anymore. That is why you get the error. (For this error, go to the fiddle I have provided, change the parse function call to stringify and then check the error in console.) What you need to do is, you need to parse it to...
21 Jun 2016 by Afzaal Ahmad Zeeshan
JSON format of data interchange and its use with C#
25 Sep 2016 by Afzaal Ahmad Zeeshan
If you have a look at your code, you will see that you are using every object in your JSON document. That is why you get 2 images and both the elements are being used in your HTML web page. for ( var i = 0; i
9 Dec 2016 by Afzaal Ahmad Zeeshan
Plus, this is a general recommendation that to parse this kind of JSON, you should consider using a dynamic approach. That way you can overcome maximum of errors in deserialization of your JSON document. I wrote the article about this topic in C#, From zero to hero in JSON with C#[^], there...
12 Feb 2017 by Afzaal Ahmad Zeeshan
One single reason: Because you are not doing it correctly. You are deserializing it to a "list of list of posts". And your JSON is a "document containing posts". I could write something as simple as, // Skip compile time type checking, first. dynamic deserialize_post =...
5 Apr 2017 by Afzaal Ahmad Zeeshan
There is no need for this much type conversion, Quote: Converting json -> xml -> dtatable ->csv is not working You can simply convert the JSON document to a CSV document. For that, you need 2 libraries, 1 that would convert from JSON to runtime objects, then another that maps those runtime...