Questions tagged [servicestack-text]

ServiceStack.Text is an independent, dependency-free serialization library that contains ServiceStack's text processing functionality

ServiceStack.Text is an independent, dependency-free serialization library that contains ServiceStack's text processing functionality, including:

  • List item
  • JsonSerializer
  • TypeSerializer (JSV-Format)
  • CsvSerializer
  • T.Dump extension method
  • StringExtensions - Xml/Json/Csv/Url encoding, BaseConvert, Rot13, Hex escape, etc.
  • Stream, Reflection, List, DateTime, etc extensions and utils.
212 questions
0
votes
2 answers

ServiceStack.Text: Use Linq and the ConvertAll

Iam using the ServiceStack.Text JsonObject parser to map into my domain model. I basically have anthing working, except when using Linq to filter on ArrayObject and the try to convert it using convertAll. Iam cannot come arround actuall after using…
emx
  • 45
  • 7
0
votes
1 answer

Make JsonServiceClient process requests with empty (not null) request objects

How can I configure ServiceStack v3.x JsonServiceClient to serialize an empty request object and call the service? I want to get an exception, but instead the JsonServiceClient returns null. I put a breakpoint at the top of the service, and it's…
Pauli Price
  • 4,187
  • 3
  • 34
  • 62
0
votes
3 answers

ServiceStack.Text.EnumMemberSerializer not working with Swagger plugin

I'm using ServiceStack v 3.9.71 and the ServiceStack.Text.EnumMemberSerializer assembly to serialize enums into readable text. This works great, my enum values are serialized into the name I've specified using the EnumMemberAttribute. The problem,…
Darcy
  • 5,228
  • 12
  • 53
  • 79
0
votes
1 answer

How to access IHttpRequest from my custom serializer in ServiceStack

We have custom serializers for our Models that protect sensitive data depending on the request path. (For instance, if the request does not start with "/admin"). Up until now, we've tried registering the IHttpRequest with the Funq container on a…
Dema
  • 6,867
  • 11
  • 40
  • 48
0
votes
1 answer

When using servicestack deserializationToString to a DTO array, a null object is at the end of the list

I am coding in C# on Visual Studio 2013 and I'm trying to deserialize some JSON using ServiceStack 3.9.71. They are contained in files (not under my control) and when I try to deserialize it, I end up with the correct array of DTO's but in…
0
votes
1 answer

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 runner) on a returned HttpResult from a service. When I dig deeper I found the exception was coming from the…
kinstephen
  • 721
  • 5
  • 8
0
votes
2 answers

Servicestack.Text not parsing json

I'm reading a json from file and serializing to any object as follows: MyObject o = myjson.FromJson(); The json text is correct as I was using Newtonsoft.Json before moving to ServiceStack. However, after serializing, the object 'o' is…
Ivan-Mark Debono
  • 15,500
  • 29
  • 132
  • 263
0
votes
1 answer

ServiceStack.Text wrong Json Parsing

I am tryng to parse a json comming from MtGox ticker. http://data.mtgox.com/api/2/BTCUSD/money/ticker I have attempted two ways with same result. JsonObject d1 = JsonSerializer.DeserializeString(downloadeddata) JsonObject d2 =…
ChristoD
  • 121
  • 1
  • 7
0
votes
0 answers

serviceStack.Text .ToJson extension method option to output empty array for null list property

There's a bit of work to set the stage, so please bear with me... I'm using knockout to databind a rather deeply nested data structure. When I retrieve the data from the database (from MongoDB using the Mongo C# Driver) there are nested…
0
votes
1 answer

Getting ServiceStack to use "default" JSON instead of JSV for parsing classes in HTTP Get

As shown in answer on this question ServiceStack by default uses JSV format for complex objects when they are passed in QueryString. Is it possible to set ServiceStack to use "default" JSON instead of JSV? Like instead of…
nikib3ro
  • 20,366
  • 24
  • 120
  • 181
0
votes
1 answer

How do I prevent ServiceStack deserializing empty request parameter values as null?

I have a very simple ServiceStack service which I am invoking it via JSONServiceClient and c# typed API. However, when I have empty arguments in Request params, ServiceStack is deserializing this into null values. I have looked and it seems like in…
0
votes
1 answer

How do I parse a multidimensional JSON array using ServiceStack.Text?

I read this post, but now I'm having trouble using it for my situation. Given the following Google Maps JSON string (I am using the data structure used in Blitzmap.js): { "zoom":12, "overlays":[ { "type": "polygon", …
0
votes
1 answer

Service Stack Licensing

I just noticed this commit: 6dbc2fae4dac29c891a67d09aa36ea7426a48051 https://github.com/ServiceStack/ServiceStack.Text/commit/6dbc2fae4dac29c891a67d09aa36ea7426a48051 What implications will this have on people currently using ServiceStack for…
sungiant
  • 3,152
  • 5
  • 32
  • 49
0
votes
1 answer

JsonSerializer.DeserializeFromString Failing On Sub Objects

Perhaps I am doing this wrong, but I have the following test which is failing: [Test] public void Can_Deserialize_List() { string json = @" { ""a"": [ { ""b"":1, ""c"":false …
niltz
  • 1,014
  • 11
  • 28
0
votes
0 answers

Losing quotation mark in ServiceStack service message sent from Fiddler / REST Console

In RestConsole / Fiddler, I send the following RAW JSON Body {"payload": {"pusher":{"fullName":"Boas Enkler","email":"info@it-design.biz","accesstoken":false}}} Body Type is set to application/json. Now I've an entity like this public sealed class…
Boas Enkler
  • 12,264
  • 16
  • 69
  • 143
1 2 3
14
15