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 8947589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:48:05+00:00 2026-06-15T12:48:05+00:00

I got a C# Class: public class JsonAttachmentModel { public Guid AttachmentId { get;

  • 0

I got a C# Class:

public class JsonAttachmentModel
{
    public Guid AttachmentId { get; set; }
    public string FileName { get; set; }
    public string ExtentionName { get; set; }
}

and the JSON i retrieve is unwellformatted, it is altogether in one string, like:

{"success":false,"message":"The remote server returned an unexpected response: (413) Request Entity Too Large."},
{"success":true,"attachmentId":"dba60830-46fd-4f51-9cd5-3c20df03988d","fileName":"bz1_20121206113251.PNG","extentionName":".PNG"},
{"success":true,"attachmentId":"3cae3f50-7d70-4183-9a69-80cb6d619dbd","fileName":"bz2_20121206113251.PNG","extentionName":".PNG"},
{"success":true,"attachmentId":"b6c8a524-4f46-4a7a-bcda-70042cb4ca92","fileName":"IammorethanOneKb123_20121206113251.txt","extentionName":".txt"},
{"success":true,"attachmentId":"994dfb9c-a185-4c51-b1f4-1017f991740d","fileName":"Iamonekb_20121206113251.txt","extentionName":".txt"}

So, my question is :

How can I convert this string to List<JsonAttachmentModel>, with the items which only match “success”: true

  • 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-15T12:48:06+00:00Added an answer on June 15, 2026 at 12:48 pm

    Use JSON.NET. Check out the Serialization/Deserialization examples from here.

    Example from the above documentation –

    string json = @"[
        {
            'Name': 'Product 1',
            'ExpiryDate': '2000-12-29T00:00Z',
            'Price': 99.95,
            'Sizes': null
        },
        {
            'Name': 'Product 2',
            'ExpiryDate': '2009-07-31T00:00Z',
            'Price': 12.50,
            'Sizes': null
        }
    ]";
    
    List<Product> products = JsonConvert.DeserializeObject<List<Product>>(json);
    
    Console.WriteLine(products.Count);
    // 2
    
    Product p1 = products[0];
    
    Console.WriteLine(p1.Name);
    // Product 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got this class: class Foo { public string Name { get; set; }
I've got simple class public class Person { string Name { get; set; }
Say we've got a class like public class Doer { public int Timeout {get;set;}
I've got a class: public class Layout { public int Width { get; set;
I've got the following class: public static class Pages { public static string LoggedOut
I've got a class, like this, simplified: public class Bookmark { public string Nav
I've got a class like this: [XmlRoot(channel)] public class Channel { [XmlElement(title)] public String
I got following class: public class Action { public Player player { get; private
I've got a class Column public class Column { public int Id { get;
I've got a class defined public class ReportClass { public int ID { get;

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.