GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Converting an RDF object containing large number values to a JSON-LD object with usingNativeTypes · Issue #331 · jsonld-java/jsonld-java

Converting an RDF object containing large number values to a JSON-LD object with usingNativeTypes #331

New issue
Copy link
New issue
Copy link
Open
Open
Converting an RDF object containing large number values to a JSON-LD object with usingNativeTypes#331
Copy link

Description

@imsdu
imsdu
opened on Mar 22, 2022
Issue body actions

Hello,

When converting an RDF object with a number exceeding Integer.MAX_VALUE such as:

<https://example.com/data/> <https://example.com/field/contentSize> "6972682403840"^^<http://www.w3.org/2001/XMLSchema#integer>

To an JSON-LD object using the useNativeTypes option, the resulting json object will be:

[
  {
    "@id": "https://example.com/data/",
    "https://example.com/field//contentSize": [
      {
        "@value": "6972682403840"
      }
    ]
  }
]

Where the @value for contentSize is mapped to a string and not to a member.
Would it be ok to change this part and change the Integer for a Long ?
Or are there any consequence that I am missing ?

I can take care of the PR if needed.

Thanks :)

Activity

  1. dr0i commented on Mar 24, 2022

    @dr0i
    dr0i
    on Mar 24, 2022
    Member
    More actions

    There is some discussion about elaborate on handling of JSON builtin types integer and double. The gist of it seems to be that, depending on the computer architecture you use, the range of long cannot always be 64bit (say on a 32bit cpu), even if xsd:long is defined to be of 64bit range. I am not deep into that discussion - maybe I don't have a proper understanding and you/others can dig and point to arguments to allow what you propose without breaking the specs.
    So atm I think this is a feature, not a bug. What dou you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.