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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:22:00+00:00 2026-05-22T17:22:00+00:00

PHP code to make an array $tag = array( ‘tag_uid’ => 1234, ‘x’ =>

  • 0

PHP code to make an array

$tag = array(
'tag_uid' => 1234,
'x' => 0,
'y' => 0
);

$tags[] = $tag;

OUTPUT: {"x":"0","y":"0","tag_uid":"1234"}

I want to make this as JSON array in C# with the same OUTPUT for that I need help, I can’t figure out which array it will be? a simple array or what.
I have tag_uid which i can pass to function and i am using JSON.NET I don’t know what should i need to write in the JsonArry function but I have tried to following

 public JsonArray CreatePhotoTag(string userId)
        {
            Dictionary<string, object> tagParameters = new Dictionary<string, object>();
            tagParameters.Add("x", "0");
            tagParameters.Add("y", "0");
            tagParameters.Add("tag_uid", userId);
            JsonArray tagsarray = ???

            return tagsarray ;
        }

Please help me

  • 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-05-22T17:22:01+00:00Added an answer on May 22, 2026 at 5:22 pm

    I recommend switching to ServiceStack.NET Text. It is incredibly fast compared to JSON.NET.

    You can serialize it like this:

    ServiceStack.NET

    var jsonSerializer = new JsonSerializer<Dictionary<String, Object>>();
    var tagsArray = jsonSerializer.SerializeToString(tagParameters);
    

    If you really want to use JSON.NET

    JSON.NET

    var tagsArray = JsonConvert.SerializeObject(tagParameters, Formatting.Indented);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ho to make this simple xml with php using DOM? Full code will be
I want to make sure my php code and my website does not use
I want to make a PHP JSON data foreach, but I met some problem.
I want to make a multidimensional array in php. Here is what i have
I have this PHP code that I use to make a dropdown form selection
I have some PHP code that is designed to make a spreadsheet with formulas
I'm trying to make a PHP regex to extract functions from php source code.
According to the PHP manual , in order to make code more portable, they
PHP code: <a id=a$id onclick=check($id,1) href=javascript:void(0) class=black>Qualify</a> I want to remove the onclick=check($id,1) so
This PHP code... 207 if (getenv(HTTP_X_FORWARDED_FOR)) { 208 $ip = getenv('HTTP_X_FORWARD_FOR'); 209 $host =

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.