Questions tagged [json]

JavaScript Object Notation, is an open standard format that uses human-readable text to transmit data objects consisting of attribute–value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML.

Filter by
Sorted by
Tagged with
13
votes
3answers
9k views

Why is upload of JSON files prohibited?

I'm trying to build a lightweight reporting tool consisting of an HTML file that would sit in a document library and consume data from JSON files residing in the same folder. The JSON file type is ...
10
votes
3answers
4k views

How to avoid _metadata in a REST response (listData.svc)

I am pulling data from a SharePoint list with listData.svc, and _metadata represent more than half of the response content. Is there a way to return list fields only, without the metadata? Below an ...
8
votes
1answer
5k views

Invalid JSON. A token was not recognized in the JSON content

I fetch data from Sharepoint using perl on a linuxmachine. This worked real good as long as I only had to read data from there. Now that I also have to change data on Sharepoint I'm stuck. Altough ...
7
votes
2answers
30k views

Getting an ItemCount with filtering in SP2013 using REST api

I am attempting to return an integer (itemcount) of the items within a SP2013 list. I have done this easily using the stock standard json method. However I have a need of counting the splist items ...
7
votes
3answers
18k views

ajax call with SharePoint REST API to get JSON response

I am trying to GET list items from SharePoint 2013 using REST API and ajax call.It is returning by default ATOM+XML. I want the response in JSON format. I tried the following however still same XML ...
7
votes
1answer
7k views

Copy List items using REST/JSON

I'm very new to REST and JSON, I want to copy list items from one list to another list in the same site on button click, both the lists are of same type but with different column names and they are '...
6
votes
1answer
15k views

REST post with metadata column?

I have a jquery script that uploads a file to document library. I'm trying to set a choice column in the same call, but can't seem to get it to work. The upload is working, but Col1 is a choice ...
6
votes
3answers
5k views

SharePoint REST POST to upload file produces corrupted or empty file

I've got this jquery/REST process that I thought was uploading a PDF file to SPO 2013 Document library, but it's only producing an empty or corrupt. Anybody know why? function ProcessUpload(...
6
votes
1answer
568 views

What is the json syntax to insert an item to a list?

I'm trying to insert an item to a list and I keep getting bad request so it's probably because my json is wrong? Here's what my json looks like: { "securit_x00e9_":"test", "column":"test", ...
5
votes
3answers
42k views

get current user info using jquery ,REST and csom

My goal is to get the login name and picture for the current user. I am using SharePoint 2013 Foundation. I tried three method and non of then worked correctly: This is with jQuery SPServices: ...
5
votes
3answers
3k views

JSON file is not served

In a standard team site, I have a document library that host a static website with html files as well json files loaded asynchronously with javascript. This was working well in SharePoint 2007. ...
5
votes
2answers
4k views

How can I populate a dropdown with a SP list?

I have a SP List with data that I need to be in a dropdown list. I also need these to have specific classes. I'm trying something like the following but having no luck: $().SPServices({ ...
4
votes
2answers
61k views

Create json data dynamically from list using javascript

Can anyone tell me how to generate json data from SharePoint lists in the below format using java script. var jsonArray = [ { "user": { "id": 100, "screen_name": "d_linq" } }, { "user": { "id"...
4
votes
3answers
135 views

Changing created through REST

I was having a hard time getting my list items to POST back to the SharePoint list when I discovered if I delete the Modified and Created properties from the JSON it would work. The JSON that is being ...
3
votes
4answers
18k views

REST service and JSON

How can I retrieve via REST service in SharePoint item column values in JSON: This is my snippet: $.ajax({ url: '/_api/web/lists/getbytitle("my list")/items/getbyid(3)', type: 'GET', header: {'...
3
votes
5answers
583 views

Proxy page for Office 365

I am working on an Office 365 (SharePoint Online) website, and I am looking for a way to retrieve data (xml, json) from remote sites that don't necessarily support JSON-P or CORS. I could use an XML ...
3
votes
2answers
7k views

Get other field value in JSON column formatting

I've been looking into the new nice JSON column formatting functionality in SharePoint Online. I cannot find a way to include values from other columns in my display result. This should be a very ...
3
votes
5answers
6k views

Submitting input from HTML Form to a SharePoint list without using Infopath

I created a blank form on a HTML webpage through my Sharepoint site called http://.../testform.html. <form> <input type='text' id='name'> <input type='submit' id='submitdata' ...
3
votes
4answers
350 views

jQuery library that uses json within a sub-web

In my sharepoint site (Sharepoint Server Enterprise 2010), in IIS(7.5), I have a web-application that runs with Sharepoint as the parent site. Almost. So, I want to use a jQuery library called gg-...
3
votes
1answer
856 views

What is JSON code to display boolean value as “yes” or “no”?

This code works but rather than display the words "true" or "false" I want it return "yes" or "no" based on what is in @currentField. { "$schema": "https://developer.microsoft.com/json-schemas/sp/...
3
votes
2answers
3k views

Column formatting with json

On a standard Date field that is inputted, can I display a full data format (example Friday, 23 March 2018 instead of 23/03/18) with Json to place in the column settings? Please advise
3
votes
1answer
50 views

Combine SharePoint Lists in a different SharePoint Site

I have a task to create a SharePoint List that is a combination of 2 lists present on another SharePoint site. There is no admin access to this site. Is is possible to get it and manipulate it? ...
3
votes
2answers
1k views

Character escaping in CAML query (REST call)

I use JS to create a CAML query. When it is generated, it looks like this: @v1 = {"ViewXml":"<View Scope='RecursiveAll'><ViewFields><FieldRef Name='ID'/><FieldRef Name='Title'/&...
3
votes
0answers
572 views

Search the document library using rest api in Sharepoint including its content

I dont require sharepoint search answers.I require using JS/Json/Web service/rest api.If i type anything in search box in top nav it should go to another page and show the results.Is there any way to ...
3
votes
1answer
150 views

Displaying an image from a SharePoint list using Javascript on a HTML page

I have a JavaScript page which queries a SharePoint list. I used an InfoPath form to add a jpg to an item. Now I want to display the image on a HTML page with the rest of the results. The jpg url is ...
2
votes
4answers
1k views

When I open my list on sharepoint, it always opens in quick edit mode. How can I fix this?

When I open my list on SharePoint, it always opens in quick edit mode, how can I fix this?
2
votes
4answers
3k views

How to GetListItems as JSON using Powershell with SharePoint Online?

I need to output the items in a SharePoint list into a *.json file for our web development team. I've successfully connected to and loaded the list using Powershell, but I'm unsure what the best ...
2
votes
1answer
478 views

Get value from JSON from SharePoint REST [closed]

If I use below line, I get output='1'. data.d.results[i].ID; But instead of giving hardcoded ID, Is there any way to pass by variable? I already tried like: var array=["ID","Title"]; data.d....
2
votes
1answer
2k views

JavaScript in CEWP does not execute

After putting a small script together and pasting it into the Content Editor Web part all my breakpoints show the following warning in IE 8's debugger: "The breakpoint is not valid. No executable code ...
2
votes
1answer
419 views

Using JSON Formatting Inside Web Parts

Have been attempting to integrate JSON formatting into a SharePoint WebPart List. Using a Kanban styled approach with a table containing several list view web parts. Need to be able to designate the ...
2
votes
2answers
1k views

JSON control if @currentfield is empty

I'm using JSON to format a hyperlink column in SharePoint online. If the column @currentfield isn't filled in, there shouldn't be a link. Can anyone help me? { "$schema": "https://developer....
2
votes
2answers
1k views

Creating new items containing lookup field with listdata.svc and json

I'm calling listdata.svc with xmlhttprequest and POST to pass json. The new item is being created, but a new item is being created on the lookup list when I do, even though I am passing an existing ...
2
votes
1answer
1k views

Can I use asp.net web service in Sharepoint project?

I had create .asmx webservice in asp.net projects. my doubts that is this able to use this webservice in sharepoint project? suppose this is my code source: function (request, response) { ...
2
votes
1answer
293 views

How to convert CAML query results to JSON with JSOM without looping

Below JSOM code is iterating through sharepoint list items. This will not be efficient if the CAML query results are in thousands. Is there any way to convert the query results directly into JSON ...
2
votes
1answer
221 views

Displaying an image from a SharePoint list using Javascript building strings

I have a JavaScript page querying a SharePoint list. It's displaying the results on a HTML page. Now I need to display an image for each item. I've uploaded an image to a Library called Device Images ...
2
votes
2answers
65 views

Is there a way to query two SharePoint Choice columns in the same list?

I have a SharePoint list that I'm querying using Javascript and JSON. I have two choice columns called LifeCycleStatus and Priority. The results for LifeCycleStatus is coming back fine, but for ...
2
votes
1answer
210 views

Security exception when trying to use JavaScriptSerializer

I am trying to use the JavaScriptSerializer class in an event receiver which is part of a sandbox solution. When trying to use the class, I get a System.MethodAccessException with the following ...
2
votes
2answers
6k views

How to get JSON column names in Javascript

I have the following JSON response: { "d": { "results": [ { "__metadata": { "id": "c55209ae-2af9-4514-ab02-67f222903f6d", "uri": "https://site-...
2
votes
2answers
848 views

Dealing with JSON data in Sharepoint

I'm interviewing for a company and they asked me to put together some demos for them. They have a platform they use on top of Sharepoint and I would be working extensively in it (this is a junior ...
2
votes
2answers
8k views

SharePoint Cross Domain Request with jQuery

I've been going around in circles for a couple hours now to no avail. I had thought that what I wanted to do was not possible but some threads that I was reading on SO were saying otherwise so I ...
2
votes
1answer
237 views

How to style custom formatted column to inherit height of row

I have a custom formatted column in a Sharepoint List that changes the background color based on the content of the field. When the content of another field in it's row is too large the background ...
2
votes
1answer
205 views

Get Field Data Types (SPFieldType?) as JSON

I'm building some python programs that transfer data from SharePoint 2010 to and from a database. Previously, I've been receiving REST queries as XML and parsing through it in order to first get the ...
2
votes
2answers
763 views

Unexpexcted end of JSON input error

I am updating a SharePoint list item in SharePoint framework web part, with the below code my item is getting updated, but it gives me the following error at the end : Unexpected end of JSON input ...
2
votes
3answers
596 views

Is JSON Light supported for the SharePoint Search REST API?

I read about JSON Light support for SharePoint REST APIs and tried to use it to save some bytes when calling the SharePoint Search REST API (/_api/search). I get unexpected behavior with nearly all ...
2
votes
1answer
1k views

SharePoint 2013 REST - Possible to Upload accross Site collections with embeded code or NAPA? SP.AppContextSite 403

Has anybody been able to REST Upload cross site/domain of a file to a document Library with REST on SPO 2013 thru embedded page code or NAPA? Wondering how app security is set on the TargetSite? I ...
2
votes
1answer
449 views

SP2010, Odata, anonymous access

Is anonymous access to listdata.svc possible? I'm trying to just simply get list items and display them using json but I either get asked to login or a 401 unauthorized. It's a claims based site ...
2
votes
2answers
3k views

How to Convert SharePoint list Data to JSON Format?

I have to get the data from SharePoint(Online) List and put the data to JSON format and create a JSON file in Local drive or SharePoint list. I am new to SharePoint online and JSON can anyone help me ...
2
votes
1answer
492 views

What is the correct way to create a custom action using REST API in SharePoint Online?

I'm trying to use Microsoft Flow and the Send an HTTP request to SharePoint action to deploy an SPFx application customizer to a modern team site. I'm able to use the /_api/Site/UserCustomActions ...
2
votes
0answers
572 views

Column formatting changes vertical alignment

I followed this Microsoft guide on column formatting and made the changes I need to get it to work on 3 of my columns. Specifically I am using the bits on "Conditional formatting based on the value in ...
2
votes
0answers
396 views

Performance issues when using Jquery Datatable in Sharepoint

I am currently using Jquery Datatable in Sharepoint, where I am not using ajax in datatable as I am fetching data from multiple tables and after doing than I am joining the list and converting it to ...