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

  • SEARCH
  • Home
  • 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 7911497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:16:23+00:00 2026-06-03T13:16:23+00:00

I am creating a report which requires returning Lists, and Json data to a

  • 0

I am creating a report which requires returning Lists, and Json data to a web page. I’m working with a multi-tiered application. The web project is created using MVC but the heavy lifting is done in class libraries in separate projects.

I am returning a report object to my controller from a class library but I wanted to know is it possible to return a mix of Lists and Json in the model? Ideally I would like the report model to be similar to the following:

public class Report
{
    public List<TopSellers> TopSellers { get; set; }
    public List<MonthlySales> MonthlySales { get; set; }
    public Json ShopSales { get; set; }

}

This way, the list stuff can be rendered as normal, but the jQuery could grab the Json being return to render the graphs I’m using.

Is this possible?

I have tried to declare it similar to this however the only option I get is ‘JsonReaderWriterFactory’.

My exposure of Json up until now has been null so if someone could help me out, or point me in the right direction I’d be very grateful!

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-03T13:16:24+00:00Added an answer on June 3, 2026 at 1:16 pm

    You could use the JSON.net library to serialize your object to a json string and set it to your ShopSales property.

    http://json.codeplex.com/

    report.OriginalList = objectToSerialize;
    
    var jsonStr = JsonConvert.Serialize(objectToSerialize);
    report.ShopSales = jsonStr;
    
    return report; 
    

    On the client you can use the ShopSales property with jQuery.

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

Sidebar

Related Questions

I am creating a Generate Report button for some data in my application. The
I am creating a report with the data which calls the stored procedure and
I have a spring web application running on JBoss which is creating a csv
I am creating a BIRT report which fetches data from SQL. There are 4
I'm creating a report in php in which 6 html drop downs appear and
I'm creating a report that will take some data from one database (Company and
I'm creating a report that lists patient deaths by date and by doctor. There
I am just working on creating a matrix report in SSRS and when I
I am trying to create an payment report which lists the sum in each
I have a business application which I am going to extend by creating mobile

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.