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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:31:31+00:00 2026-05-11T14:31:31+00:00

I want to have a JSON object with the value of an attribute as

  • 0

I want to have a JSON object with the value of an attribute as a string with the character '. For example:

{ 'Dimensions' : ' 12.0' x 9.6' ' } 

Obviously this is not possible. How do I do this? With Python.

  • 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. 2026-05-11T14:31:32+00:00Added an answer on May 11, 2026 at 2:31 pm

    Isaac is correct.

    As for how to do it in python, you need to provide a more detailed explanation of how you are building your JSON object. For example, let’s say you’re using no external libraries and are doing it manually (ridiculous, I know), you would do this:

    >>> string = '{ \'Dimensions\' : \' 12.0\\\' x 9.6\\\' \' }' >>> print string { 'Dimensions' : ' 12.0\' x 9.6\' ' } 

    Obviously this is kind of silly. If you are using the standard python json module, try this:

    from json import JSONEncoder encoder = JSONEncoder() string = encoder.encode({ 'Dimensions':' 12.0\' x 9.6\' ' })  >>> print string {'Dimensions': ' 12.0\' x 9.6\' '} 

    which is the desired result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this json string: $row['medium'] = {\medium\:13|17|1|14, \medium_sub\:21}; now I want to make
I have a JSON object holding the following value: @value = {val:test,val1:test1,val2:test2} I want
I have a string: items[0].name that I want to apply to a JSON object:
I have a JSON file and want to parse value of variable second value
Example: I have the following JSON object. {currentVersion : 10.0, folders : [], services
I have Json object like this { resultArr: [ { ID:1, 0:1, APPROVAL LEVEL:1,
I want to bind a JSON object to a HTML element. e.g. I have
I have a json object array. I want to search the array and for
I have a json object: images:{1:{imagename:image1.gif,url:image1url},2:{imagename:image2.gif,url:image2url},3:{imagename:image3.gif,url:image3url}} I want to fetch imagename and url from
I have a json object of this type: jsonObject={visits:'3', v1:{'timestamp':'1231313.311', 'time_year':'2011', 'time_month':'Jan', 'time_date':'15' 'X_value':'X'

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.