tagged [servicestack-text]

ServiceStack.Text NuGet Package for version 3.9.61 and above has the wrong .NET 3.5 dll

ServiceStack.Text NuGet Package for version 3.9.61 and above has the wrong .NET 3.5 dll This is not really a question but... It seems since 3.9.61 the version of ServiceStack.Text.dll supplied in the ...

Exception while evaluating service stack text for iOS

Exception while evaluating service stack text for iOS I'm trying to evaluate servicestack.text in tamarin project. I've created test iOS app and added to packages ServiceStack.Client 4.0.35 However it...

Why is no constructor needed of the object, deserialized from a json string, using ServiceStack Json Serializer

Why is no constructor needed of the object, deserialized from a json string, using ServiceStack Json Serializer I wonder why no constructor is necessary to deserialize a json string into a .Net/C# cla...

ServiceStack date deserialization error

ServiceStack date deserialization error On ServiceStack.Text version 4.0.38 - ServiceStack.Text.Common.DateTimeSerializer.ParseShortestXsdDateTime("9/10/2015") - ServiceStack.Text.Common.DateTimeSeria...

24 Feb at 13:38

JsConfig<MyClass>.ExcludePropertyNames example, not working for me

JsConfig.ExcludePropertyNames example, not working for me Trying to exclude properties from a model from being included during serialization. I am using the following syntax: Just after that I have th...

17 Aug at 03:57

ToOptimizedResult on an HttpResult causes a StackOverflow exception

ToOptimizedResult on an HttpResult causes a StackOverflow exception I'm using v3.9.56.0 and I'm encountering a stack overflow exception when I call `ToOptimizedResult` (Called from my own service runn...

Servicestack cannot parse JSON array with leading whitespace

Servicestack cannot parse JSON array with leading whitespace Using ServiceStack v4.5.6.0, JSON array cannot be parsed correctly when leading space exists. ``` var test1 = "[{}, {}]"; var test1Result =...

16 Feb at 19:9

ServiceStack.Text Disposes Input Stream

ServiceStack.Text Disposes Input Stream When deserializing data from a stream ServiceStack.Text closes the input stream. Since there is no issue tracker at Github and their web site refers to SO I pos...

5 May at 21:49

How to Deserialize json to one of several DataContracts with ServiceStack

How to Deserialize json to one of several DataContracts with ServiceStack I'm connected to a websocket and subscribed to the MessageRecieved event. In that event I will get a string (json) that could ...

ServiceStack Output XML format - xml attribute

ServiceStack Output XML format - xml attribute I am using ServiceStack and need to render XML in specific format. Here is my POCO class And expected output should be like below. ```

ServiceStack does not escape control characters in JSON

ServiceStack does not escape control characters in JSON ServiceStack's JsonSerializer does not seem to encode control characters correctly. For example, this C# expression.... ... evaluates to this......

27 Aug at 19:18

using ServiceStack.Text: determine JSON is Array, Object or String?

using ServiceStack.Text: determine JSON is Array, Object or String? using JSON.net I could do this as answered in this [link](https://stackoverflow.com/questions/20620381/determine-if-json-results-is-...

ServiceStack vs StackExpress & non pre-release versions of StackExpress

ServiceStack vs StackExpress & non pre-release versions of StackExpress I was wondering if the only difference between StackExpress & ServiceStack is that the dynamic handling for .net 4, which is in ...

18 Jul at 15:23

ServiceStack - array inside dictionary deserialized to string

ServiceStack - array inside dictionary deserialized to string I have a `DT0` that has the following property Now the challenge I have is that if I add an array to the `Parameters` it will be deseriali...

6 Mar at 13:54

jsconfig register custom de/serialization for an (tagging) interface

jsconfig register custom de/serialization for an (tagging) interface How can i configure Json De/Serialization to use a custom function for a specific type or subclassed types. I expected that registe...

23 Sep at 14:47

How to prevent a JsConfig scope from affecting global settings

How to prevent a JsConfig scope from affecting global settings In `AppHost.Configure` I set a global JSON config `JsConfig.TreatEnumAsInteger = false;` and have a simple handler with two GET endpoints...

23 Oct at 20:35

Extension method .ToJsv() from ServiceStack.Text ignores null values in collections

Extension method .ToJsv() from ServiceStack.Text ignores null values in collections My test class: When I call extension method from ServiceStack.Text on TestA object with property Collection which is...

25 Jan at 14:27

ServiceStack's SerializeFn custom serializer/deserializers - sticks across requests?

ServiceStack's SerializeFn custom serializer/deserializers - sticks across requests? I'm using ASP.Net with MVC, and would like to have custom SerializeFn for only certain requests. It looks like the ...

13 Oct at 16:26

ServiceStack Deserializing Interface property null in object

ServiceStack Deserializing Interface property null in object I want to use ServiceStack JsonSerializer. I am setting IncludeTypeInfo property true before I serialize my object.And my serialized string...

17 Oct at 17:57

Serializing CustomUserSession in ServiceStack

Serializing CustomUserSession in ServiceStack We're trying to use Redis ICacheClient with a CustomUserSession, but our custom properties are not stored. The problem seems to be in the json created by ...

10 Feb at 16:42

Servicestack.Text not parsing json

Servicestack.Text not parsing json I'm reading a json from file and serializing to any object as follows: The json text is correct as I was using Newtonsoft.Json before moving to ServiceStack. However...

19 Feb at 14:35

ServiceStack.Text JsonObject and Arrays

ServiceStack.Text JsonObject and Arrays I have the following code where ServiceStack.Text make the objects which should actually be an array become a string. ``` var json1 = "{\"x\": [1, 2, 3]}"; var ...

17 Jan at 13:53

ServiceStack.Text strange behavior while deserializing nullable boolean

ServiceStack.Text strange behavior while deserializing nullable boolean Suppose I have a class containing a member with `bool?` type. I expect ServiceStack's JSON deserializer that any values other th...

Servicestack JSV empty string deserialized as null

Servicestack JSV empty string deserialized as null It seems that JSV deserializes an empty string as null. The following test fails for JSV but passes for JSON. ``` class Foo { public string Str...

19 Nov at 15:38

Sending json data to client from an interface server without change

Sending json data to client from an interface server without change I have two type of servers which contain some information. One of them is that is used for collecting all information in one place a...