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

ServiceStack.Text in .NET not deserializing nested datetime

I am talking to a web service from Xamarin. It is sending dates down over the wire in JSON, in ISO-8601 format, like this: "2016-05-13T16:02:47.480-07:00" If I try to deserialize just a single date, it works fine. But when the DateTime is a member…
Dave Vronay
  • 625
  • 7
  • 22
0
votes
1 answer

ServiceStack serialisation of long int value

I have an object with an attribute defined as long and the exact value is 635980054734850470 but when it gets serialised the JSON output gives me 635980054734850400 It seems to be consistently dropping the last two digit values, rather than giving…
vonec
  • 681
  • 10
  • 22
0
votes
1 answer

Deserialize CSV with CustomHeaders using ServiceStack.Text

I'm trying to use ServiceStack.Text for deserializing a csv file containing custom headers. var csv = "Col-1,Col-2" + Environment.NewLine + "Val1,Val2" + Environment.NewLine + "Val3,Val3" + Environment.NewLine; public class Line { public string…
Kai-Rune
  • 462
  • 6
  • 17
0
votes
1 answer

ServiceStack Client multiple GET arguments (not comma separated)

I am writing a client wrapper over a RESTful API which can take more than one value for an argument. Take for example this endpoint /rest/bug?product=Foo&product=Bar My class for this is public class SearchBugRequest : IReturn { …
0
votes
1 answer

Well Formed XML using Service Stack

I'm building an MVC5 application which pulls records from a database and allows a user to perform some basic data cleansing edits. Once the data has been cleansed it needs to be exported as XML, run through a validator and then uploaded to a third…
user964769
0
votes
1 answer

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 o1 = JsonSerializer.DeserializeFromString(json1); var isString1 =…
trenki
  • 7,133
  • 7
  • 49
  • 61
0
votes
1 answer

ServiceStack.Text JsConfig changes globally

Is there a way to avoid JsConfig changes globally? I only want to customize the configuration when serialize my json, and don't affect others places. JsConfig.AlwaysUseUtc = true; JsConfig.ExcludeTypeInfo =…
Mr.Wang from Next Door
  • 13,670
  • 12
  • 64
  • 97
0
votes
1 answer

ServiceSatck JSON Serlization

I am using ServiceStack nuget package for JSON Serialization/ Deserialization since it is fast compares to Newtonsoft. I have a data structure which contains some properties which is a List of custom objects, here are my classes public class…
jereesh thomas
  • 113
  • 1
  • 13
0
votes
1 answer

ServiceStack.Text: serializing DataSet to json

I am having a trouble serializing a dataset to json using ServiceStack.Text (from Nuget.org). I am using the latest stable build 4.0.50 and VS 2015. I keep getting Process is terminated due to StackOverflowException My code: using System; using…
Erik B
  • 3
  • 3
0
votes
1 answer

Form-Data array not being deserialized to request dto

I'm trying to do filtering function for KendoUI Grid. Kendo sends data as form-data: take:20 skip:0 page:1 pageSize:20 filter[filters][0][operator]:eq filter[filters][0][value]:abc filter[filters][0][field]:No filter[logic]:and I tried to…
smokeing
  • 259
  • 1
  • 3
  • 13
0
votes
0 answers

Deserializing Multidimensional array from JSON with ServiceStack fails

I have an object with a single double[,] property, which was serialized using ServiceStack ToJson() method as follows: {"xy":[[-2.9774,-2.0682],[-1.1378,2.7118]]} However I cannot deserialize it back to my object type (Parameters) using…
Erwin Mayer
  • 18,076
  • 9
  • 88
  • 126
0
votes
1 answer

Deserializing oData to a sane object with ServiceStack

So here's what I'm getting back from the oData service... { "odata.metadata":"http://server.ca/Mediasite/Api/v1/$metadata#UserProfiles", "value":[ { …
Steve McNiven-Scott
  • 1,770
  • 2
  • 15
  • 29
0
votes
2 answers

Anyone have problems with postgres jsonb in ServiceStack Ormlite?

Today I was playing around with the jsonb datatype in postgres, using ServiceStack Ormlite. A basic model had a complex type property that itself contained a dictionary of interface objects (pseudocode below). Usually ServiceStack handles this by…
0
votes
1 answer

Convert to object in ServiceStack.Text

I have a JsonObject representing the following JSON { "prop1": "text string", "prop2": 33, "prop3": true, "prop4": 6.3, "prop5": [ "A", "B", "C" ], "prop6": { "A" : "a" } } And in JInt scripting engine, there is a method…
Mr.Wang from Next Door
  • 13,670
  • 12
  • 64
  • 97
0
votes
1 answer

Does ServiceStack.Text has any Json Serializer/DeSerializer size limit?

Does Service-stack.Text has any Json Serialize/ DeSerialize size limit ? I want to know is there any size limit on Json serialization and DeSerialization. Based on this I want to send no of object collection as input. Thank you