Table of Contents

Class SkillJsonHelper

Namespace
nanoFramework.WebServer.Skills
Assembly
nanoFramework.WebServer.Skills.dll

Provides utility methods for generating JSON schemas that describe the input and output parameters of actions.

public static class SkillJsonHelper
Inheritance
SkillJsonHelper
Inherited Members

Methods

GenerateInputJson(Type)

Generates a JSON object schema describing the input parameters for an action.

public static string GenerateInputJson(Type inputType)

Parameters

inputType Type

The Type representing the input parameter type.

Returns

string

A JSON string representing the input parameters schema.

GenerateOutputJson(Type, string)

Generates a JSON object describing the output schema for an action.

public static string GenerateOutputJson(Type outputType, string description)

Parameters

outputType Type

The Type of the output object.

description string

A description of the output.

Returns

string

A JSON string representing the output schema.

IsPrimitiveType(Type)

Checks if the specified Type is a primitive type.

public static bool IsPrimitiveType(Type type)

Parameters

type Type

The Type to check.

Returns

bool

true if the type is a primitive type; otherwise, false.