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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:27:53+00:00 2026-06-18T05:27:53+00:00

I am using Dictionary to build up key/value and need to stringify it for

  • 0

I am using Dictionary to build up key/value and need to stringify it for HTTP Post. They problem is when I stringify the data using Cordova’s JsonHelper, it displays the “key:” and “value:” then the actual key and value. I want to remove these.

I am developing for Windows Phone 8.

This:

Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("user_id", user_id);
data.Add("order_id", order_id);
data.Add("package_id", package_id);
data.Add("order_status", "0"); //0 is success
data.Add("platform", "windows");
String postData = WPCordovaClassLib.Cordova.JSON.JsonHelper.Serialize(data); 

Outputs:

[{"Key":"user_id","Value":"33"},{"Key":"order_id","Value":"07dbda1d-f877-4be8-b2d9-dba1f4622054"},{"Key":"package_id","Value":"package4"},{"Key":"order_status","Value":"0"},{"Key":"platform","Value":"windows"}]
  • 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-18T05:27:54+00:00Added an answer on June 18, 2026 at 5:27 am

    You can use built-in Json serializer (JavaScriptSerializer)

    string postData = new JavaScriptSerializer().Serialize(data);
    

    or Json.Net (Which supports Supports .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone and Windows 8)

    string postData = JsonConvert.SerializeObject(data);
    

    Output would be:

    {
      "user_id": "1",
      "order_id": "100",
      "package_id": "200",
      "order_status": "0",
      "platform": "windows"
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a dictionary in C# to store some key-value pairs and had
I need to replace a word AAAA in a file using dictionary: dictionary.txt AXF1
I have a process that pickles a dictionary using Python 3.2. I then need
I'm using gviz_api (google-visualization-python) to build some line charts. http://code.google.com/p/google-visualization-python/ I'e edited a line
i want to build a android dictionary app using trie. so m i new
I want to build a combobox with key->postal and value->city to use as filter
I'm using a Dictionary<int, MyType> in a class. That class implements a interface that
I'm binding my viewmodel and view using resource dictionary as follows <DataTemplate DataType={x:Type viewmodels:MyViewModel}>
Possible Duplicate: Which collection for storing unique strings? I am currently using a Dictionary<string,
Here is a command line script for a dictionary lookup using Wordnet: #!/bin/bash #

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.