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
1
vote
1 answer

ServiceStack - Request Classes with Same Name in Different Namespaces Throws Error

My project contains a large set of services which we've grouped into different domains which allows us to call them using corressponding Urls i.e. Domain 1 /FlightManagementDomain/SeatMaps /FlightManagementDomain/Passengers Domain…
1
vote
1 answer

ServiceStack: How to deserialize to dynamic object

Tried using JsonSerializer.DeserializeFromString(data) and it does not work. Can one deserialize into dynamic, or is SS not capable of doing that?
epitka
  • 17,275
  • 20
  • 88
  • 141
1
vote
1 answer

ServiceStack.Text.XmlSerializer.DeserializeFromString result change when I change the order of xmlnode. Why?

What is wrong with ServiceStack.Text.XmlSerializer ? I have object: public class weatherdata : IReturn { public Location location { get; set; } } public class Location { public string name { get; set; } public string country…
1
vote
3 answers

getting rid of the timezone part in servicestack.text json de/serialization?

Do you guys know how to eleminate the TimeZone part from servicestack.text JsonSerializer's result? It's currently like 2015-06-30T23:59:00.0000000+08:00 , I want it to be 2015-06-30T23:59:00.0000000 Thx a lot!
iNc0ming
  • 383
  • 1
  • 6
  • 17
0
votes
0 answers

ServiceStack.Text \ ServiceStack.SSE serialization problem

We are using ServiceStack SSE, as RedisSentEvents, ServiceStack version is 5.8 Sometimes the SSE client receives an Invalid JSON on the other side, and sometimes we get an exception. Most of the times we receive an Invalid JSON and right after that…
Shubaka
  • 13
  • 3
0
votes
1 answer

Serialize dynamic list to CSV without header in Servicestack.Text

I'm trying to generate a csv file using CsvSerializer.SerializeToCsv(data), but I want to omit the headers. I read this question, but this is not working as I'm using a list of dynamic objects. I've tried: IEnumerable data =…
Alex S. Diaz
  • 2,637
  • 2
  • 23
  • 35
0
votes
0 answers

Does anyone know of a ServiceStack.Text branch that can Serialize private members?

I have a set of classes that act like Enumerators where there are two tiers to represent classifications. Where the Key and Numeral are never exposed publicly so as to force any implementation to work with the class object itself with operators and…
Donald
  • 1
  • 3
0
votes
2 answers

ServiceStack.Text FromJson and EmitLowercaseUnderscoreNames

A third party I am calling returns objects in lower case and with underscores, e.g. { "token_type":"bearer", "access_token":"blahblah", "expires_in":3600, "scope":"rsp" } I want to deserialize this into a Pascal case style class, e.g. public class…
Matt Frear
  • 52,283
  • 12
  • 78
  • 86
0
votes
0 answers

ServiceStack Http Util - GetJsonFromUrlAsync terminates program abruptly

Using the ServiceStack Http Util extension methods, and following the exact instructions found here, invoking: var result = await uri.GetJsonFromUrlAsync(); My application just terminates - no exception, no result, nothing. If I switch the call…
dingalla
  • 1,219
  • 3
  • 12
  • 19
0
votes
1 answer

Deserialize a generic object in ServiceStack.Text

I tried to find a solution for deserializing an anonymous object from JSON to a structure resembling the original JSON structure in ServiceStack.Text, but I did not find any acceptable solution. While I do understand that the deserializer does not…
ioan
  • 722
  • 4
  • 12
0
votes
0 answers

ServiceStack JSON deserialization - complex POCO - returning null in .NET Core 2.0

We are using ServiceStack.NET as our web services layer. Earlier to .NET Core 2.0 version of ServiceStack (v5.0.2), the below complex POCO was being deserialized correctly by JsonServiceClient (from C# of course). Now we are getting null. From…
0
votes
1 answer

MVC Controller Returns CSV but does not Download Using AJAX

Inside my controller I am using ServiceStack.Text to serialize a List and wish to return it to the client. I am passing json that gets passed and manipulated into a list of objects that I then want to return as a csv. I can confirm this part is…
LCaraway
  • 1,257
  • 3
  • 20
  • 48
0
votes
1 answer

Serialize JSON using DataAnnotation to apply decimal formatting rules

We have several complex classes with a variety of decimal (and other) properties. Of the dozens of decimal properties, they all fall under 3 specific formatting rules: Leading zero, one decimal place Leading zero, two decimal places No leading…
0
votes
0 answers

How to determine csv data causing exception?

I'm having trouble debugging a ServiceStack.Text string FromCsv call. I am parsing several csv documents but one document keeps throwing an exception. I can't determine the root cause. The exception is: "Index was out of range. Must be non-negative…
brady321
  • 1,475
  • 13
  • 14
0
votes
0 answers

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 Interface Server that is used for collecting all information in one place and pass it to mobile devices. I used httpClient to get JSON data with REST from data servers. I want…
Nasir Jafarzadeh
  • 6,123
  • 1
  • 13
  • 19