Generate JSON Schema from C# class

This text demonstrates how to generate JSON Schema for a given C# class. If you like strong-typed languages like C#, then you will probably love JSON Schema, as it allows to describe JSON structure in terms of data types, maximum length of strings, regex patterns for field validation etc. If you use Visual Studio 2013 Update 4 or newer, then you will also have full IntelliSense support for this standard, which makes writing JavaScript code much less error-prone and more fun.



Is SPFieldLink missing ShowInEditForm and ShowInNewForm properties?

Are some properties missing from SPFieldLink?

When you try to construct data relationship structure in SharePoint, at some point you might notice that SPFieldLink is missing the two boolean flags known from SPField type: ShowInEditForm and ShowInNewForm. To make it more confusing, the ShowInDisplayForm flag is available and exposed as a public property.

A fragment of MSDN documentation for SPFieldLnk

Fig. 1. A fragment of MSDN documentation for SPFieldLnk

Should the missing properties be available? That’s clearly what developers expect. Moreover, MSDN documentation displays those properties in example on the SPFieldLink.SchemaXML documentation page. Also, SPField object contains private fields for ShowInEditForm and ShowInNewForm. Is it just a mistake that those fields weren’t exposed as public properties, or the functionality is just not implemented in SharePoint 2013?




SharePoint: integer field doesn’t appear in site columns

This article presents a little SharePoint weirdness that you might encounter when you try to add the column of the SPFieldType Integer to the site columns collection.

The following line seems perfectly fine in Visual Studio, the code compiles and throws no exception at runtime:




How to: create Promoted Links app in C# (SharePoint 2013)

Creating most types of lists (or apps in SharePoint 2013 terminology) in C# code is pretty straightforward. You just need to choose the correct list type from the built-in enum Microsoft.Sharepoint.SPListTemplateType. Then, you can create list by invoking appropriate Add() method on a SPListCollection, like in the first example: