Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8317175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:31:57+00:00 2026-06-08T21:31:57+00:00

Strange issue- I have a complex DTO with several child objects, declared like this:

  • 0

Strange issue- I have a complex DTO with several child objects, declared like this:

[code]

public class ScoutingReportProPitcher
{
    [DataMember]
    public Guid ReportID { get; set; }

    [DataMember]
    public ScoutingReport Report { get; set; }
    [DataMember]
    public ScoutingReportPro Pro { get; set; }
    [DataMember]
    public ScoutingReportPitcher Pitcher { get; set; }
}

[/code]

All is being sent to the client correctly. When he tries to send the data back in a PUT or a POST, the child objects are not filled in. I thought maybe I had to initialize the child objects in the DTO constructor – but this just resulted in the inbound object having child objects with all empty properties.

I had my UI developer send me the JSON object that he’s POSTing to me, when I run the JsonSerializer.DeserializeFromString, the object seems to get filled correctly.

What else can I look at to determine why the object isn’t getting passed into the POST method correctly from the outside?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:31:58+00:00Added an answer on June 8, 2026 at 9:31 pm

    Can you show us the json data you are trying to send? Also what is the code sending the PUT and POST look like.

    Have you tried using Fiddler and looking at the data? http://www.fiddler2.com/fiddler2/

    To see the raw data in code you need to intercept the Input stream and prevent the deserialization from occurring. You will want to undo this once you fix it.

    First decorate your DTO class with IRequiresRequestStream like

    public class ScoutingReportProPitcher : IRequiresRequestStream  
    {
        public System.IO.Stream RequestStream { get; set; }
        ....
     }
    

    Second, in the OnBeforeExecute(T request) method you can peak at the json data by logging or inspecting with a breakpoint.

    protected override void OnBeforeExecute(T request)
    {
        var rawData = base.RequestContext.Get<IHttpRequest>().GetRawBody();
        base.OnBeforeExecute(request);
    }
    

    See here for a more full explanation: https://groups.google.com/d/topic/servicestack/l9qFvZNbuT0/discussion

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very strange issue with PHP. I run this very simple code:
I have a quite strange issue. Please, look at these screenshots: Code of that
I have a strange issue with my code I can't seem to figure out.
I have a strange issue. It almost seems like a bug. if ($object->error) {Form::BuildReturn();
I have a strange issue from a client in that our code, which they
I have this strange issue with some third party DLL's. The third party provider
I have this strange issue. Xcode target does not find my 3rd party mac
Ok I have a strange issue again with Internet Explorer but this only happens
So I have some strange issue with nl2br so I have the following code:
Strange Issue. I have the some code that queries a database and prases the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.