Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9064933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:22:44+00:00 2026-06-16T16:22:44+00:00

I have a scenario whereby I am needing to display some fairly simple data

  • 0

I have a scenario whereby I am needing to display some fairly simple data (using JQUERY) from an external web app my client is providing that serves up well formatted json (validated using jsonlint.com). this is my first time using json and when I use dataType jsonp and the LIVE url I get an ‘invalid label’ error on the first quote in the beginning of the name:value pairs in the JSON data… but when I copy that same json and save it locally and change jsonp to just json, it works and I can manipulate the data any way I want in the DOM and accomplish what Im after.

what do I need to do to get the live URL json to work?

    <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>JSON Test</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script>
$.ajax({
type : 'GET',
//url : 'jsondata2.js',
url: 'http://.....'    //MY LIVE URL HERE.   NOTE, THE LOCAL FILE ABOVE THAT DOES WORK (JSON NOT JSONP) IS JUST A COPY/PASTE OF THE DATA THAT THIS URL DISPLAYS IN BROWSER.  ,
dataType : 'jsonp',
success : function(jsonData) {
alert(jsonData.PropertyName);
},
error : function() {
alert('Error loading the JSON data');
}
});
</script>
</head>
<body></body>
</html>

Heres the json data:

{
"PropertyID": 1468,
"PropertyName": "AG Test One",
"Listing Information": {
    "Availability": "Not Specified",
    "Pricing Information": "For Sale, Price: 1.00 (Set Price per Acre)"
},
"Location": {
    "City": "ZZ",
    "County": "ZZ Test County",
    "Municipality": "Within City Limits",
    "State": "SC",
    "Tax Map ID": "123-123-123",
    "ZipCode": "22222"
},
"Physical Details": {
    "Certified Property": false,
    "Minimum Divisible Acreage": 0,
    "Site Comments": null,
    "Site Improvements": "Forested",
    "Surrounding Land Use": [
        "North: Airport / Port / Intermodal Facility",
        "South: Waterway (River / Lake)",
        "East: Utility (Easements / Substations)",
        "West: Correctional Facility"
    ],
    "Total Site Size": 500,
    "Zoning": null
},
"Transportation": {
    "Barge Access": false,
    "Name of Rail Carrier Providing Service": "None specified",
    "Nearest Commercial Airport": "None Specified",
    "Nearest Interstate": "None Specified",
    "Nearest Sea Port": "None Specified",
    "Railway Access": false,
    "Runway Access": false
},
"Utilities": {
    "Diameter of Waste Water Main": 0,
    "Diameter of Water Main": 0,
    "Distance To Electric Provider": 1,
    "Distance to Natural Gas Provider": 0,
    "Distance to Sewer Service": 0,
    "Distance to Water Service": 0,
    "Electric Provider": "Undetermined",
    "Fire Insurance Rating": "1",
    "Natural Gas Provider": null,
    "Telecommunications Providers": null,
    "Type of Sewer": "",
    "Water Service Provider": "Undetermined",
    "Water Water Service Provider": "Undetermined"
}
}

I also tried getJSON method… and get same reults in both local and external url scenarios:

$(document).ready(function() {
            $.getJSON('jsondata2.js', function(data) {
                //$.getJSON('SAME LIVE URL HERE....', function(data) {
                var output = "<ul>";
                output += "<li>" + data.PropertyName + "</li>";
                output += "</ul>";
                document.getElementById("placeholder").innerHTML = output;
            });
        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:22:46+00:00Added an answer on June 16, 2026 at 4:22 pm

    For JSONP your server needs to output

    callback(JSONSTRING)
    

    and not just the JSON string! jQuery will automatically execute this Javascript code using the success callback of $.ajax()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have scenario, in which I am getting images using Web Service and all
We have a scenario whereby we are hosting an ASP.NET MVC web site on
I need to create relationships for my entities, whereby I have the following scenario:
I have scenario where I need to host a web service (WCF) on Azure
I have a scenario where people login to the IM we developed using the
Scenario I have a line of code whereby I pass a good number of
I have a scenario where by I want to zip an email attachment using
I have a scenario where, the data (both x and y coordinates) comes dynamically.
I have a scenario whereby we need an activity to have a timeout associated
I have a scenario whereby I want n amount of classes to look at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.