All Verbs | /testdata/AllCollectionTypes |
---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class TestDataAllCollectionTypes
{
}
open class AllCollectionTypes
{
open var intArray:ArrayList<Int> = ArrayList<Int>()
open var intList:ArrayList<Int> = ArrayList<Int>()
open var stringArray:ArrayList<String> = ArrayList<String>()
open var stringList:ArrayList<String> = ArrayList<String>()
open var floatArray:ArrayList<Float> = ArrayList<Float>()
open var doubleList:ArrayList<Double> = ArrayList<Double>()
open var byteArray:ByteArray = ByteArray(0)
open var charArray:ArrayList<String> = ArrayList<String>()
open var decimalList:ArrayList<BigDecimal> = ArrayList<BigDecimal>()
open var pocoArray:ArrayList<Poco> = ArrayList<Poco>()
open var pocoList:ArrayList<Poco> = ArrayList<Poco>()
open var pocoLookup:HashMap<String,ArrayList<Poco>> = HashMap<String,ArrayList<Poco>>()
open var pocoLookupMap:HashMap<String,ArrayList<HashMap<String,Poco>>> = HashMap<String,ArrayList<HashMap<String,Poco>>>()
}
open class Poco
{
open var name:String? = null
}
Kotlin TestDataAllCollectionTypes DTOs
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 /testdata/AllCollectionTypes HTTP/1.1
Host: test.servicestack.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { intArray: [ 0 ], intList: [ 0 ], stringArray: [ String ], stringList: [ String ], floatArray: [ 0 ], doubleList: [ 0 ], byteArray: AA==, charArray: [ ], decimalList: [ 0 ], pocoArray: [ { name: String } ], pocoList: [ { name: String } ], pocoLookup: { String: [ { name: String } ] }, pocoLookupMap: { String: [ { String: { name: String } } ] } }