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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:16:36+00:00 2026-06-14T11:16:36+00:00

I need to identify what JSON values my server expects. I’ve been doing testing

  • 0

I need to identify what JSON values my server expects. I’ve been doing testing within Haskell, and all is well. So now I need to take the next step so I can document what these values look like for other people to use.

One of my REST methods expects an Array

Array (fromList [String "BNAP",Number 312])
is how Haskell expresses this.

Testing with cURL, I want to do something like this:

curl -D- -X POST -H "Content-Type: application/json" --data '["BNAP":312]'      
http://10.64.16.6:3000/Read

But this seems to not be valid JSON

ParseError {errorContexts = ["]"], errorMessage = "Failed reading: satisfyWith", errorPosition = 1:8}

If Haskell was expecting an Object Object (fromList [String "BNAP",Number 312]) for example, the JSON would be expressed this way
--data '{"BNAP":312}'

So to me, it follows that my above attempt would be right. But, it’s not. So, how does one express an Array with one Pair consisting of a String and a Number, with cURL?

  • 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-14T11:16:38+00:00Added an answer on June 14, 2026 at 11:16 am

    The colon is not valid JSON here:

    ["BNAP":312]
           ^
    

    Array elements should be separated by a comma:

    ["BNAP", 312]
    

    If you wanted an array with a single key-value pair, you need to add curly braces:

    [{"BNAP": 312}]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In sql server 2005 I need to identify all the stored procedures and triggers
I need to identify all html elements on a page in a browser agnostic
Server Side I need to identify the carrier (ATT, Verizon, etc.). On iPhone you
I need to be able to identify certain attributes of a JSON response that
I need to identify the overloaded constructor to pass the values using reflection .The
I need to identify (potentially nested) capture groups within regular expressions and create a
I do scanning of file system and I need identify all 3gp files. Usually,
I have a script developed by previous employee and I need to identify all
I have been making an iPhone App where I need to identify and decompose
I need to identify if any checkbox in a CheckBoxList is not checked (

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.