• Skip to primary navigation
  • Skip to content
  • Skip to footer
W3HTech Blog
  • Home
  • About
  • Categories
  • Archives

    Convert JSON Object to String javascript

    January 26, 2011 less than 1 minute read

    You can user browser native function JSON.stringify to do this

    var foo = {};
    foo.bar = "new property";
    foo.baz = 3;
    
    var jsonString = JSON.stringify(foo);

    https://developer.mozilla.org/En/Using_JSON_in_Firefox

    And IE8 also supports it - http://blogs.msdn.com/b/ie/archive/2008/09/10/native-json-in-ie8.aspx

    Categories: JavaScript

    Updated: January 26, 2011

    Share on

    X Facebook LinkedIn Bluesky
    Previous Next

    You May Also Enjoy

    Configuring the Starship Prompt for Bash

    August 1, 2026 2 minute read

    Starship is a minimal, fast, and highly customizable shell prompt written in Rust. It works the same way across Bash, Zsh, Fish, PowerShell, and more, so you...

    What is a side effect in JavaScript?

    October 9, 2020 less than 1 minute read

    A side effect is any application state change that is observable outside the called function other than its return value. For example modifying any external...

    What is a Monorepo?

    September 30, 2020 less than 1 minute read

    Monorepo, is a single repository which contains more than one logical project like a web application and its iOS application.

    Dependency Injection in JavaScript

    September 29, 2020 less than 1 minute read

    Dependency Injection is a pattern where instead of creating or requiring dependencies directly inside a module, we pass them as paramaeters or reference.

    • Feed
    © 2026 W3HTech Blog. Powered by Jekyll & Minimal Mistakes.