ScannerVision Web Server

<back to all web services

GetJsonPicklistItems

Requires Authentication
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class JsonDto implements IConvertible
{
    JsonDto();
    JsonDto.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "JsonDto";
    TypeContext? context = _ctx;
}

class GetJsonPicklistItems extends JsonDto implements IConvertible
{
    String? TemplateGuid;
    String? Guid;
    Map<String,String?>? Answers;

    GetJsonPicklistItems({this.TemplateGuid,this.Guid,this.Answers});
    GetJsonPicklistItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        TemplateGuid = json['TemplateGuid'];
        Guid = json['Guid'];
        Answers = JsonConverters.fromJson(json['Answers'],'Map<String,String?>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'TemplateGuid': TemplateGuid,
        'Guid': Guid,
        'Answers': JsonConverters.toJson(Answers,'Map<String,String?>',context!)
    });

    getTypeName() => "GetJsonPicklistItems";
    TypeContext? context = _ctx;
}

class JsonPicklistItemsResponse extends JsonDto implements IConvertible
{
    String? Guid;
    List<JsonPicklistItem>? Items;

    JsonPicklistItemsResponse({this.Guid,this.Items});
    JsonPicklistItemsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Guid = json['Guid'];
        Items = JsonConverters.fromJson(json['Items'],'List<JsonPicklistItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Guid': Guid,
        'Items': JsonConverters.toJson(Items,'List<JsonPicklistItem>',context!)
    });

    getTypeName() => "JsonPicklistItemsResponse";
    TypeContext? context = _ctx;
}

class JsonPicklistItem implements IConvertible
{
    String? Key;
    String? Value;

    JsonPicklistItem({this.Key,this.Value});
    JsonPicklistItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Key = json['Key'];
        Value = json['Value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Key': Key,
        'Value': Value
    };

    getTypeName() => "JsonPicklistItem";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'buildmax.org', types: <String, TypeInfo> {
    'JsonDto': TypeInfo(TypeOf.Class, create:() => JsonDto()),
    'GetJsonPicklistItems': TypeInfo(TypeOf.Class, create:() => GetJsonPicklistItems()),
    'Map<String,String?>': TypeInfo(TypeOf.Class, create:() => Map<String,String?>()),
    'JsonPicklistItemsResponse': TypeInfo(TypeOf.Class, create:() => JsonPicklistItemsResponse()),
    'List<JsonPicklistItem>': TypeInfo(TypeOf.Class, create:() => <JsonPicklistItem>[]),
    'JsonPicklistItem': TypeInfo(TypeOf.Class, create:() => JsonPicklistItem()),
});

Dart GetJsonPicklistItems DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/GetJsonPicklistItems HTTP/1.1 
Host: buildmax.org 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"TemplateGuid":"String","Guid":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'JsonPicklistItemsResponse' using the custom 'csv' filter}No parameterless constructor defined for this object.