import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
import 'dart:collection';
class HelloBuiltin implements IConvertible
{
DayOfWeek? dayOfWeek;
HelloBuiltin({this.dayOfWeek});
HelloBuiltin.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
dayOfWeek = JsonConverters.fromJson(json['dayOfWeek'],'DayOfWeek',context!);
return this;
}
Map<String, dynamic> toJson() => {
'dayOfWeek': JsonConverters.toJson(dayOfWeek,'DayOfWeek',context!)
};
getTypeName() => "HelloBuiltin";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: <String, TypeInfo> {
'HelloBuiltin': TypeInfo(TypeOf.Class, create:() => HelloBuiltin()),
'DayOfWeek': TypeInfo(TypeOf.Class, create:() => DayOfWeek()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/oneway/HelloBuiltin HTTP/1.1
Host: test.servicestack.net
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"dayOfWeek":"Sunday"}