question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uri JSON roundtrip failure

See original GitHub issue
import _root_.io.circe.syntax._
import org.http4s.Uri
import org.scalacheck.Prop._
import org.specs2._
import org.http4s.circe._
import org.http4s.testing.ArbitraryInstances.arbitraryUri

class JsonSpec extends Specification with ScalaCheck { def is = s2"""
  Uri roundtrip                                            $testUriRoundtrip
  Uri equality                                             $testUriEquality
  """

  // This test fails:
  def testUriRoundtrip = forAll { uri: Uri => uri.asJson.as[Uri] must beRight(uri) }

  // This test is fine:
  def testUriEquality = forAll { uri: Uri => uri must_=== uri }
}

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ashwinbhaskarcommented, Aug 25, 2020

@rossabaker I can pick this up.

0reactions
Unisaycommented, Feb 10, 2018

Another observation.

This parses fine:

Uri.fromString("http://%BC:80")

This fails parsing:

Uri.fromString("%BC:80") // Expected to parse?
Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Json.NET Uri (de)serialization errors - Stack Overflow
DeserializeObject<Uri>(json);. The DeserializeObject method throws an JsonReaderException. This works fine with 4.0.2. I've submitted an issue ...
Read more >
Working With JSON (Application Developer's Guide)
You can perform document operations and searches on JSON documents within MarkLogic Server using JavaScript, XQuery, or XSLT. You can perform document ...
Read more >
Language Server Protocol Specification - 3.17
This includes the server capabilities property path and JSON structure. Clients should ignore server capabilities they don't understand (e.g. the initialize ...
Read more >
Try the new System.Text.Json source generator - .NET Blog
Json source generator, we now have a few models for JSON serialization in . ... Uri? requestUri, Type type, JsonSerializerContext context, ...
Read more >
net/url - Go Packages
func Parse(rawURL string) (*URL, error); func ParseRequestURI(rawURL string) (*URL, ... PathUnescape; QueryEscape; QueryUnescape; URL; URL (Roundtrip); URL.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found