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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:35:37+00:00 2026-05-26T06:35:37+00:00

My understanding is that if I use the json parser with parse on json

  • 0

My understanding is that if I use the json parser with parse on json data, I would get json types back. Unless,of course, the data is mal-formed. But then I would expect a failed parse.

This is all done in ghci.

>test <- (parseUrl "https://pkg.cudaops.com/cgi-bin/qaLinkEditor.cgi?json=1") :: (IO (Request IO))
>nManager <- newManager
>catch <- httpLbsRedirect test nManager
>let catchChunks = toChunks $ responseBody catch
>let flatChunks = Data.ByteString.concat catchChunks
>let parsed = parse json flatChunks
>:t parsed
>parsed :: Data.Attoparsec.Result Value

The result is rather large, Here’s part of the beginning of parsed that I wrote out to file

Done “\n” Object (fromList [(“name”,String “versions”),(“products”,Object (fromList [(“BCC Admin”,Object (fromList [(“available”,Array (fromList [String …”

How am I getting fromList? Where it says”Object (fromList [(“available”,Array… “, I expected “Object(Array [“available”,Array …” Am I misusing parse? Could I just be misunderstanding how parse works, it did what it was supposed to do and my expectations were wrong?

  • 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-26T06:35:37+00:00Added an answer on May 26, 2026 at 6:35 am

    That’s just how arrays print. The convention is that Show instances should give valid Haskell code that recreates the value.

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

Sidebar

Related Questions

It is to my understanding that one should use a forward-class declaration in the
It's my understanding that common wisdom says to only use exceptions for truly exceptional
so I'm finally understanding prototype and how to use it. I'm sure that I'm
My understanding is that both JAAS and SQL Server can be configured to use
With F# it is my understanding that you can use the inline keyword to
Ok, I'm having trouble finding an answer to this that isn't just use JSON
My understanding is that to use the plugin I need to insert this code
Understanding that I should probably just dig into the source to come up with
It's my understanding that nulls are not indexable in DB2, so assuming we have
It is my understanding that I can test that a method call will occur

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.