import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class TestUploadWithDto : IPost
{
@SerializedName("int") open var Int:Int? = null
open var nullableId:Int? = null
@SerializedName("long") open var Long:Long? = null
@SerializedName("double") open var Double:Double? = null
open var string:String? = null
open var dateTime:Date? = null
open var intArray:ArrayList<Int>? = null
open var intList:ArrayList<Int>? = null
open var stringArray:ArrayList<String>? = null
open var stringList:ArrayList<String>? = null
open var pocoArray:ArrayList<Poco>? = null
open var pocoList:ArrayList<Poco>? = null
open var nullableByteArray:ArrayList<Short>? = null
open var nullableByteList:ArrayList<Short?>? = null
open var nullableDateTimeArray:ArrayList<Date>? = null
open var nullableDateTimeList:ArrayList<Date?>? = null
open var pocoLookup:HashMap<String,ArrayList<Poco>>? = null
open var pocoLookupMap:HashMap<String,ArrayList<HashMap<String,Poco>>>? = null
open var mapList:HashMap<String,ArrayList<String>>? = null
}
open class Poco
{
open var name:String? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/TestUploadWithDto HTTP/1.1
Host: test.servicestack.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
int: 0,
nullableId: 0,
long: 0,
double: 0,
string: String,
dateTime: 0001-01-01,
intArray:
[
0
],
intList:
[
0
],
stringArray:
[
String
],
stringList:
[
String
],
pocoArray:
[
{
name: String
}
],
pocoList:
[
{
name: String
}
],
nullableByteArray:
[
0
],
nullableByteList:
[
0
],
nullableDateTimeArray:
[
0001-01-01
],
nullableDateTimeList:
[
0001-01-01
],
pocoLookup:
{
String:
[
{
name: String
}
]
},
pocoLookupMap:
{
String:
[
{
String:
{
name: String
}
}
]
},
mapList:
{
String:
[
String
]
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { int: 0, nullableId: 0, long: 0, double: 0, string: String, dateTime: 0001-01-01, intArray: [ 0 ], intList: [ 0 ], stringArray: [ String ], stringList: [ String ], pocoArray: [ { name: String } ], pocoList: [ { name: String } ], nullableByteArray: [ 0 ], nullableByteList: [ 0 ], nullableDateTimeArray: [ 0001-01-01 ], nullableDateTimeList: [ 0001-01-01 ], pocoLookup: { String: [ { name: String } ] }, pocoLookupMap: { String: [ { String: { name: String } } ] }, mapList: { String: [ String ] } }