servicestack-text's questions - Japanese 1answer

0 servicestack-text questions.

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 post the question here. A call to ...

I have created a view using Servicestack.Razor. On the view page I am trying to get the session using following code. var session = GetSession<AuthUserSession>().ToJson(); When I put this code ...

The following code sample writes a simple object to a couchbase lite (version 2) database and reads all objects afterwards. This is what you can find in the official documentation here This is quite ...

I am using ServiceStack.Text and ServiceStack.Logging.NLog to log the DTO requests sent to/from a web service from a .NET client application. While the machines are generally secure, I'd like to ...

Anyone know how to force the ServiceStack.Text library to trim leading or trailing whitespace when deserializing to an object? I've noticed it can't handle parsing a CSV file when the header rows ...

Is there a support to sign requests using RSA-SHA1 when using Servicestack's httputil methods? Thanks rudrvij

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 ...

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#...

I am using ServiceStack and need to render XML in specific format. Here is my POCO class [DataContract] public class LookupModelBase { [XmlAttribute, DataMember] public int Id { get; set; } ...

I'm consuming a third party WebApi using ServiceStack. Imagine this API has the following route. https://api.example.com/v1/people/{id} returns the person with the specified ID. JSON: { "id": ...

Csv Serialization considers "ItemDelimiter" and honors it. While deserialization doesn't honor "ItemDelimiter", it only looks for item separator and splits the item accordingly. So the deserialization ...

Consider I have these classes in my Api model, because other actions may need customerData with different attributes I hide base properties like this: public class CustomerData { public string ...

I'm trying to read a CSV file sent from an upload form and convert it to my Poco. Here is my test file: "30247685204","PWITA1","114000/2017/SE","","27/11/2017","1027/00","","","ZZPWI1","INTER MEMBER1"...

var results = await db.SelectAsync<dynamic>(q); If I do ToJson() on the results, the names stay in PascalCase and not in CamelCase even if I use ToCamelCase() var results = await db....

consider following class: class Foo { public string bar { get; set; } public string rab { get; set; } public override string ToString() { return string.Format("[Foo bar={0}, ...

I'm trying to use ServiceStack.Text for deserializing a csv file containing ";" as the seperator. The test csv contains this data --------------- | Col1 | Col2 | --------------- | Val1 | Val2 | ----...

All of my EF classes have a Projection() method that helps me choose what I want to project from the class to the SQL queries: Example: public static Expression<Func<Something, dynamic>&...

I am trying to leverage AWS Elasticache (Redis) from my Lambda function using the ServiceStack .Redis.Core library (version 1.0.44). When running the lambda from my local machine (mac osx) everything ...

I have a web service that service an Excel file public class ReportService : Service { public IReportRepository Repository {get; set;} public object Get(GetInvoiceReport request) { ...

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 ...

I am new to ServiceStack.Text and finding it hard how to use it in my project. I did a nuget install but how do I add it to my formatters collection so it uses that by default? I am using Asp.Net ...

I'm using ServiceStack to run a REST API and am running into issues serializing the response object. More specifically, when I call JsonSerializer.SerializeToString(.) on the response object all ...

Our application uses temporary queues to direct service bus responses to the originating caller. We use the built-in ServiceStack.RabbitMq.RabbitMqServer to publish and handle messages. Message<...

I'm using servicestack to handle xml request from client, my client require always send response like that: <?xml version="1.0" encoding="utf-8"?> <Response> <actionCode>01</...

Firstly, please forgive any rookie mistakes here - I'm not a regular poster I'm afraid. Now on to the nitty gritty... I am trying to use ServiceStack.Text to serialize objects to CSV. If I keep it ...

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 ...

I most admit that I'm probably forgetting something really simple, but I can't figure it out what I have a class: public class UserAgentInfo { public string agent_type { get; set; } public ...

I have a complex csv that I need to transform into json Csv Data Sample var csv="Id,Name,Seo\n13,Foo,\"{\"\"SeoUrl\"\": \"\"some-seo-url\"\",\"\"SeoPageTitle\"\": \"\"SeoPageTitle\"\",\"\"...

I'm using ServiceStack.Text to serialize/deserialize objects before storing them in Redis, but i've come across some objects, that won't deserialize as expected. I have a base type (bit of legacy ...

I have a CSV string, and one of it's column value is json serialized. "Id,Name,Seo\r\n13,SpecialCollections,\"{\"\"SeoUrl\"\":\"\"special-collections\"\",\"\"SeoPageTitle\"\":null,\"\"SeoKeywords\"\":...

I am using ServiceStack HttpUtils to connect to a third-party REST API. How do I pass in Proxy Server and Proxy Port when making requests? Thanks rudrvij

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 ...

I have a customer who wants to ensure that responses from our JSON web service do not contain HTML. So instead of returning a string containing angle brackets they want encoded angle brackets. Two ...

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 ...

Here is the legacy Message class that has all of the XML attributes with the output that is generated using the built-in .NET serializer: [Serializable] [XmlRoot(Namespace = http://www.tibco....

Using ServiceStack v4.5.6.0, JSON array cannot be parsed correctly when leading space exists. var test1 = "[{}, {}]"; var test1Result = JsonSerializer.DeserializeFromString<JsonArrayObjects>(...

I am trying to use QueryStringSerializer.SerializeToString to serialize a DTO: public class StripeCreateSubscription { public string customer { get; set; } public Dictionary<string, ...

I am creating a json deserializer. I am deserializing a pretty big json file (25mb), which contains a lot of information. It is an array for words, with a lot of duplicates. With NewtonSoft.Json, I ...

I am running into an issue while looking at SS. I am writing a custom Stripe implementation and got stuck on web hooks, this in particular: https://stripe.com/docs/api#event_object data->object - ...

I want to use ServiceStack JsonSerializer. I am setting IncludeTypeInfo property true before I serialize my object.And my serialized string contains all type informations like "__type":".Interfacesb,....

It seems that there is a bug in the ServiceStack method TypeSerializer.DeserializeFromString regarding nullable types Is this a known issue? Is there a fix or a workaround? Consider the following ...

using JSON.net I could do this as answered in this link string content = File.ReadAllText(path); var token = JToken.Parse(content); if (token is JArray) { IEnumerable<Phone> phones = token....

I'm using ServiceStack.Text JsonSerializer on a web application using c#. The problem is that for an specific functionality I need to serialize date values into a json but currently is failing when ...

I'm currently using the Newtonsoft.json nuget package but I'd like to find a faster alternative. ServiceStack.Text seems to parse it, but it's returning the JSON in a different format that I'm ...

I set JsConfig in Application_Start method in my asp net mvc application protected void Application_Start() { JsConfig.DateHandler = JsonDateHandler.ISO8601; JsConfig....

I have a very weird problem here pertaining to ServiceStack.Text's serializer. Suppose I have two classes, one called Person and another called Address. Person: public class Person { public ...

We use custom attributes to annotate data how it should be displayed: public class DcStatus { [Format("{0:0.0} V")] public Double Voltage { get; set; } [Format("{0:0.000} A")] public Double ...

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,...

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 ...

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" + ...

Related tags

Hot questions

Language

Popular Tags