Improve company productivity with a Business Account.Sign Up







JavaScript Object Notation, or JSON, is human-readable text used when transmitting data objects consisting of attribute:value pairs between a server and a web application as an alternative to XML. JSON, while it is originally derived from JavaScript, is a language-independent data format. Code for parsing and generating JSON data is available in many programming languages.

Share tech news, updates, or what's on your mind.

Sign up to Post

How to delete products from shopping cart when user session ends (or Logout in ) in jsp web application.When you then add a product to your cart (not logged in) and then decide to login and go to the checkout, I now have 2 products in the basket. Is there a way to not store products in the basket when you logout?

I know that this is a cookies issue, but is there a way to remove products from the cart when logging out?

Following is code what i have tried.

<link href="style.css" rel="stylesheet" type="text/css" media="all" /> 
<div class="cart"> 
						<form action="#" method="post" class="last"> 
							<input type="hidden" name="cmd" value="_cart" />
							<input type="hidden" name="display" value="0" />
							<button class="w3view-cart" type="submit" name="submit" value=""><i class="fa fa-cart-arrow-down" aria-hidden="true">cart</i></button>
						<div class="item" style="width: 30%">
										<div class="glry-w3agile-grids agileits"> 
											<div class="new-tag"><h6>20% <br>Off</h6></div>
											<a href="products4.jsp"><img src="s3.jpg" alt="img"></a>
											<div class="view-caption agileits-w3layouts">           
												<h4><a href="products4.jsp">Nylon Shuttle</a></h4>
												<p>Lorem ipsum dolor sit amet consectetur</p>
												<form action="#" method="post">
													<input type="hidden" name="cmd" value="_cart" />

Open in new window

Free Tool: IP Lookup
LVL 12
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Iam trying to upload an application to appstore .While validating, it shows itunes store operation failed.While uploading, it shows webservice content type is not json and could not connect to apple's webservice.Iam attaching its screenshot.Please help me.Validation imageUploading
I'm trying submit a form and return data in JSON building a DataTable

Within the JSON call back I'm accessing 1 of the data columns to add a   class to the row and push the unique class into an array
I then need to build Filter Buttons from the array

Please not: the code bellow has  been copied from a closed system so may contain typo's

In my actual code the datatable loads but you have to submit the form twice to build the buttons

I haven't been able make the fitter work either

 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.

var CodeArray=[];

    // Bind the <a> click event
    $('#MyForm').submit(function() {

    // Set up the DataTable
        // Specify your column data
        "columns": [{ "data": "name" }, { "data": "Lat" }, { "data": "Long" },{"data" : "code"}, { "data": "url" }],
        // Set up the AJAX Datasource
        "ajax": {
            "url": "data.json",
            "dataSrc" : function (json) {
                // Manipulate the returned data before rendering it
                $.each(json, function(i, item) {
           = * 2;
                    item.url = "<a href='" + item.url + "'>" + "Click Me" + "</a>";

Open in new window


How to create a flow charts using d3.js.These two charts depend on each others.
Chart can be using json format.
I'm having difficulties on how to display the json objects in a particular section/category. I'm making a restaurant filter where you can search and display particular restaurant and I am only/should be using JavaScript. (Inside the zip, there is a file called restaurant. it should be in json file since I removed the extension because json file is not listed as their accepted attachments here. inside the restaurant json file, are a list of array objects that categorizes each restaurant and the description and names that should be in displayed. thank you very much. there is an attached file
Next code is from one demo from fabric.js
It assigns lines to circle, so then when circle is moved assigned lines are following it.

 var circle1=[];
  function makeCircle(left, top, line1, line2) {
    var c = new fabric.Circle({
      left: left,
      top: top,
      strokeWidth: 2,
      radius: 6,
      fill: '#fff',
      stroke: '#666',
    c.hasControls = c.hasBorders = false;

    c.line1 = line1;
    c.line2 = line2;
    return c;

Open in new window

 var leftx2,topy2;
var moveHandler = function (evt) {
    var obj =;
  leftx2 = obj.get('left');
  topy2 = obj.get('top');
    obj.line1 && obj.line1.set({ 'x2': obj.left, 'y2': });
    obj.line2 && obj.line2.set({ 'x1': obj.left, 'y1': });

Open in new window

I need to save  elements data  to DB, so I am using JSON for it.
It works fine  to  save all parameters ( i get elements after page refresh) , but not the information which lines will move, if circle is moving.
How to save also this?

I was trying to add line1,line2 to:
function saveJsonF(){ //____________________________________________________________________saveJsonF; 
var jsonToPHP= JSON.stringify(canvas.toObject(['id','name','line1','line2']));

Open in new window

But is not working.
How to find out as which parameter is  'line1','line2' ?
Want to post data on a rest api with given below code of vb6.  but fails.
 With Req
        .Open "POST", "", async:=False
        .SetRequestHeader "Content-Type", "application/json; charset=utf-8"
        .SetRequestHeader "Accept", "application/json"
        Dim UNM As String
        Dim JSON As String
        JSON = Text13
        .Send JSON
       MsgBox CStr(.Status) & " " & .StatusText & vbNewLine _
                       & .GetAllResponseHeaders() & vbNewLine _
                       & String$(40, "-") & vbNewLine _
                       & .ResponseText
I wanted to know how can you fetch a particular string/object in external json file? I am coding a website of online shop for shoes where you can categorize the kind of shoes to display by reading it from json file to javascript but how?
        <!DOCTYPE html>
<html lang="en">

    <meta name="viewport" content="initial-scale=1.0">
    <meta charset="utf-8">
    <title> Online Shop </title>


            <li><a href="#">Stilettos</a></li>
            <li><a href="#">Wedges</a></li>





Open in new window


    "name": "DKNY",

    "category": "Stilettos",

    "location": "Texas",

    "name": "Prada",

    "category": "Wedge",

    "location": "Texas",

    "name": "Jimmy Choo",

    "category": "Stilettos",

    "location": "Melbourne",
here are 3 problems I am facing:

I have to click on button to make it work. It do not work when I hit enter.
I am not able to change the value of variable globalURL
I am not able to retrieve input box value that present on popup.html
How to update SharePoint 2013 Calendar using ASP.Net or API or JSON, etc?
The 14th Annual Expert Award Winners
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

I am new to VSTS and have been tasked with creating a number of very similar release definitions. I have done this a couple of times and have the manual process sorted but wanted to know if there is an automated or scripted way of doing this as essentially the only main difference between releases is the build artifact...

I have built a skeleton release definition and tried to export it to template so that I could potentially reimport it with a few customisations, but looking at the exported JSON configuration file there are a number of "magic" strings and index numbers etc that I dont know what they should be set to.

I am sure there must be a way of doing this so that every new release definition I need to create can be automated to an extent. Any ideas?
I want to parse the JSON Data in to grid

I want to make a ajax call and get the json values and display in to  grid

could you please help me  the pseudo code

I am a complete novice with REST APIs but have managed to connect to one using SOAPUI.

My next step is that I need to perform a similar connection using a powershell script.

So I need to connect using a Post method.

1. Obtain the authorization value
2. Use the value obtained as part of the authorization request as a "Request parameter" to make a Post call by using a pre-defined variable.
3. Use a further parameter to specify the data format i.e. json
i want to write a file to log the json request details with every registration request .File name should be today date.txt .if file name alreay exists append the json request with next line with same file if file name is not there  it will create a new file could you please give me a pseudo code for that
I want to track page links by saving them in a json file in the background with out user noticing. I am using jquery .ajax for the front end and trying to send the link value to a php page for insertion into the json file. I can get the value of the link fine on the front end and am using the right code to add to a json file on the back end in php. I just can't seem to get the value of the link to transfer to php and be saved in the json file. I'm also not sure I have the right if condition in the php to start the php code running.
We want to create an APIs in .net platform. Is there an third party tool which will create the API faster and response format should be JSON, XML and soap based APIs.

Which is the tool for API documentations.
how can read data json from  Url web service To oracle DataBase
  "currency": {
    "code": "USD",
    "name": "US Dollar",
    "prefix": "$",
    "postfix": null
  "products": [
      "product_id": xxxxx,
      "model_code": "xxxxx",
      "quantity": 1,
      "price": "45.60",
      "total": "45.60",
      "retail_price": "63.84"
  "shipping": [
      "name": "UPS",
      "price": 43.83,
      "delivery": "3 -10 Days delivery"
      "name": "DHL",
      "price": 20.29,
      "delivery": "2-6 days"
      "name": "FedEx",
      "price": 31.46,
      "delivery": "2-6 days"
      "name": "EMS",
      "price": 25.74,
      "delivery": "7 - 25 Days delivery"
      "name": "Air Mail",
      "price": 11.85,
      "delivery": "10 - 25 Days delivery"

Open in new window

Need to find out the length of the array : "products":

Code used:
Dim xmlhttp As Object
Dim Json As Object
    Set Json = JsonConverter.ParseJson(xmlhttp.responseText)
Dim arraylength As Integer
Dim star As Variant
With xmlhttp
    .Open "GET", strURL, False
    star = Split(.responseText, "products:", -1)
End With
On Error Resume Next
arraylength = UBound(star)
MsgBox "No of elements in array : = " & arraylength

Open in new window

Please help
we want to use as our primary CRM. but I just do not know how to create API with them.
They have very limited documentation about that.

And if you know how to create CRUD API with this crm, please help me. and I will be really appreciated your helps.
Currently, I have MVC website and can use jquery/ajax to create json to call. I am very new to do that so if you can show me examples in codes....that will be awesome.
Free Tool: SSL Checker
LVL 12
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hello Experts

I have a created an ARM template in Visual Studio, and I need to package the JSON files so that I can use the option in Octopus Deploy to deploy the JSON files within the ARM template as a package - as described in the following link, under section 'Template Contained in a Package

The problem is that I don't know what application in Visual Studio to package the application? I did some research and I read that the best package to use in nuspec as described here:

However, there are a whole bunch of nuspec applications. The closet I got to what I need is the NuGetToolsPackager, as shown in the image.

Example Project
However, if there are any other suggestions, they will be most welcome.
Are there any user's out there familiar with CT FreitRater v 3.0 and interacting with the web service via JSON?
Looking for a way to add more than one JSON file to the script, below to produce a single CSV, but with multiple rows.  Each row should include the same number of fields and attributes, but be tied to a single JSON (ROW 1 = JSON 1, ROW 2 = JSON 2, etc.).  The following produces a CSV with one row of data from a single JSON.

import pandas as pd
df = pd.read_json("pywu.cache.json")
df = df.loc[["station_id", "observation_time", "weather", "temperature_string", "display_location"],"current_observation"].T
df = df.append(pd.Series([df["display_location"]["latitude"], df["display_location"]["longitude"]], index=["latitude", "longitude"]))
df = df.drop("display_location")
print(df['latitude'], df['longitude'])
df = pd.to_numeric(df, errors="ignore")
pd.DataFrame(df).T.to_csv("CurrentObs.csv", index=False, header=False, sep=",")

Open in new window

Hey all this is the first time I am using an thepirat000 Audit.MVC package and I have the base down and working just fine:
[Audit(EventTypeName = "InsertOrderAction", IncludeHeaders = true, IncludeModel = true)]
public ActionResult Index()
     var auditScope = this.GetCurrentAuditScope();

     auditScope.Comment("New comment from controller");
     auditScope.SetCustomField("TestField", Guid.NewGuid());

     return View();

Open in new window

Which outputs to a .json file and looks like this:
  "EventType": "InsertOrderAction",
  "Environment": {
    "UserName": "XXXXXXX",
    "MachineName": "XXXXXXX",
    "DomainName": "XXXXX",
    "CallingMethodName": "auditing.Controllers.HomeController.Index()",
    "AssemblyName": "auditing, Version=, Culture=neutral, PublicKeyToken=null",
    "Culture": "en-US"
  "Comments": [
    "New comment from controller"
  "StartDate": "2018-02-20T10:32:16.7258207-05:00",
  "EndDate": "2018-02-20T10:33:29.1468164-05:00",
  "Duration": 72421,
  "Action": {
    "HttpMethod": "GET",
    "ControllerName": "Home",
    "ActionName": "Index",
    "ViewName": "Index",
    "ViewPath": "~/Views/Home/Index.cshtml",
    "FormVariables": {},
    "ActionParameters": {},
    "UserName": "XXXX\\XXXXXXX",
    "RequestUrl": "/",
    "IpAddress": "",
    "ResponseStatus": "200 OK",
    "ResponseStatusCode": 200,
    "Headers": {
      "Connection": "Keep-Alive",

Open in new window

This is a spin-off of another thread: I am needing a way to add markers to Google Map, based-on geo-coordinates from an external JSON file.  The JSON file is stored locally on my web server and is being called to display information within a map window.   Additionally, I am looking for a similar method for calling a url to display a custom marker for each location.  The URL would also be stored in the same JSON file.

Below, is my code:

function initMap() {
        var hc = {lat: 40.466442, lng: -85.362709};
        var map = new google.maps.Map(document.getElementById('map'), {
            zoom: 12,
            center: hc

        var infowindow = new google.maps.InfoWindow({
            content: obj

        var iconBase = "";
            var marker = new google.maps.Marker({
                position: hc,
                map: map,
                title: 'Hartford City',
                icon: iconBase

        marker.addListener('click', function() {
  , marker);

    var downloadJSON = function() {
        $.getJSON( "ajax/GeoObs.json?_="+new Date().getTime(), function( data ) {
            var items = [];
            items.push( "<li id='Weather'>Station: " + 

Open in new window


I have a text file which has multiple json rows in it.

What I need to do is the following:-

1. Read thru the file
2. Select only certain elements not all, remap to a new name for example AuthenticationId could be AuthId
3. Ingest in to MongoDB as JSON

How can this be achieved in Python?

{"AuthenticationId":"997","CommandLine":"C:\\Windows\\system32\\wbem\\wmiprvse.exe -secured -Embedding","ConfigBuild":"1007.3.0005907.1","ConfigStateHash":"3163607488","EffectiveTransmissionClass":"3","Entitlements":"15","ImageFileName":"\\Device\\HarddiskVolume3\\Windows\\System32\\wbem\\WmiPrvSE.exe","ImageSubsystem":"2","IntegrityLevel":"16384","MD5HashData":"1df2fc82b861bc9612657d1661e9ae33","ParentAuthenticationId":"997","ParentProcessId":"1627804482161","ProcessCreateFlags":"16","ProcessEndTime":"","ProcessParameterFlags":"24577","ProcessStartTime":"1512962460","ProcessSxsFlags":"64","RawProcessId":"9276","SHA1HashData":"1aa3fda50123dd14a055b4d6601beedead69fe11","SHA256HashData":"835f2a94e47830b06654e484bf7a1cc0b9882f579716dca198e32d22218a07e5","SourceProcessId":"1627804482161","SourceThreadId":"39913451443946","TargetProcessId":"1756187997441","TokenType":"2","UserSid":"S-1-5-19","aid":"2bc82f8878df4b9f7712273e755a93be","aip":"","cid":"99cdff8f89af458d858c3d6b3e312e11","event_platform":"Win","event_simpleName":"ProcessRollup2","id":"4ff73eae-de22-11e7-a0dd-06e913674db2","name":"ProcessRollup2V6","timestamp":"1512962460994"}

Open in new window

Open in new window







JavaScript Object Notation, or JSON, is human-readable text used when transmitting data objects consisting of attribute:value pairs between a server and a web application as an alternative to XML. JSON, while it is originally derived from JavaScript, is a language-independent data format. Code for parsing and generating JSON data is available in many programming languages.

Related Topics