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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:10:47+00:00 2026-06-08T23:10:47+00:00

I am currently integrating with a third party API, they are accepting json string

  • 0

I am currently integrating with a third party API, they are accepting json string similar to the following format :

{    
"test-specialism": null,
"salaryCollection": [
    {
      "id":
               {
                   "jobtypeid": 1
               },  
"maxsalary": 564,
        "minsalary": 123,
        "salarycurrency": "GBP",
        "salarytype": "A"
    },
{
        "id":
               {
                   "jobtypeid": 2
               },
               "maxsalary": null,
               "minsalary": null,
               "salarycurrency": "GBP",
               "salarytype": null
           },
    }],

}

And here is my object:

   public class Salary {
    public double Minimum { get; set; }
    public double Maximum { get; set; }
    public PaymentFrequency Frequency { get; set; }
    public double Step { get; set; }
    public int JobTypeId { get; set; }
    public SalarySetting() {        }

}

public class Alert {
   public string Specialism {get;set;}
   public Salary Permanent { get; set; }
   public Salary Temporary { get; set; }
   public Salary Contract { get; set; }
}

As you can see the object structure is very inconsistent with the JSON strucuture. What would be an ideal way to convert the object to that specified json string? I’ve tries JSONProperty to map the property, that doesn’t seem to work well in this case.

  • 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-08T23:10:49+00:00Added an answer on June 8, 2026 at 11:10 pm

    You can use System.Web.Script.Serialization.JavaScriptSerializer. Example :

    public class Product{
        public string Name { get; set; }
        public string ID { get; set; }   
    }
    

    And I will adding some instances to Lists :

    Product p1 = new Product {Name="Product1",ID="1"};
    Product p2 = new Product {Name="Product2",ID="2"};
    List<Product> pList = new List<Product>() {p1,p2};
    

    Then I’m going to serialize it :

    System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
    string sJSON = serializer.Serialize(pList);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently integrating information from a third party API into a wordpress site. What
Let's say I'm integrating Twilio (or any third party api) into a Rails project.
I am currently integrating lua with C++. For lua I need static methods which
I'm currently integrating Facebook in my application and I'm currently at the point where
I'm currently integrating a CMS (developed in PHP) authentication with Active Directory. This specific
I'm currently integrating external applications in my app ex SalesForce.com. My question pertains to
I'm currently having troubles integrating Jack into my QUnit. Besides from not knowing where
I'm currently exploring the possibility of integrating MYOB Exo Business (Exonet) to a shopping
We currently have a suite of integration tests that run via MbUnit test suites.
I'm currently integrating my Wix projects in MSBuild. It is necessary for me to

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.