Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gregg Kellogg
    @gkellogg
    Framing works by first flattening the input JSON and creating a map structure from subject to associated object. The top-level frame then matches against those objects. If that matches against more than one object, there will be multiple top-level entries, so there is no top-most object when flattening.
    But, maybe you can describe your use case further.
    Didac
    @umbreak
    That’s helpful already. Thanks
    Iwan Aucamp
    @aucampia
    I think I asked this before, can I somehow have a json object where the keys are used as @id
    Gregg Kellogg
    @gkellogg
    Yes, you can alias @id in the context; it's common to create id as an alias of @id and use id as a property of an object. (@type is also commonly aliased).
    Iwan Aucamp
    @aucampia
    thanks @gkellogg
    SinglaAjay
    @SinglaAjay

    Hello Guys,

    Hope you are doing great and Safe with your family.

    Actually we have react app where we had added the JSON-LD Data by following the link https://developers.google.com/search/docs/data-types/job-posting, And also the data is verified by using the tool provided by the google https://search.google.com/structured-data/testing-tool. And as well submitted the site map as per recommended. But stills our jobs are not showing up on google. I am working for a client and it needs on urgent basis as this really important for the client to have the jobs in google search for the product branding. Any help will be appreciated. Thanks in advance!!

    Iwan Aucamp
    @aucampia
    Is expanded JSON-LD 1.1 compatible with 1.0?
    I guess maybe not, maybe I should ask what operations on JSON-LD 1.1 will yield JSON-LD 1.0 compatible document
    I am guessing flattening
    Gregg Kellogg
    @gkellogg
    @SinglaAjay I'm afraid that this isn't really the forum for dealing with SEO issues.
    @aucampia Generally, once you flatten the data, the expanded form will be compatible with 1.0, but there may be some features that remain (can't think of any off the top of my head).
    A fool-proof way would be to turn the JSON-LD into RDF, and then back into JSON-LD. One area that may catch you up is if the data contains lists of lists, which 1.0 didn't support.
    Iwan Aucamp
    @aucampia
    I am trying to use jsonld 1.1 in rdflib, and I was looking at their to_rdf method, and it seems they first do expand and then process the expanded for, so I was thinking I could do the same somehow and then just use rdflib's json-ld 1.0 support. I will give flatten a try and see how I fare
    Iwan Aucamp
    @aucampia
    I was looking at pyld's to_rdf method I mean
    Iwan Aucamp
    @aucampia
    I'm wondering, should JSON-LD be able to deal with something like {"@context": {"example":"http://example.com"} "@id": "example:with space:"}
    $ echo '{"@context": {"example":"http://example.com/"}, "@id": "example:with space:", "example:key": "value"}' | rdfpipe -i json-ld -o turtle /dev/stdin 
    @prefix example: <http://example.com/> .
    
    Traceback (most recent call last):
      File "/home/iwana/.local/bin/rdfpipe", line 8, in <module>
        sys.exit(main())
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/tools/rdfpipe.py", line 183, in main
        parse_and_serialize(args, opts.input_format, opts.guess,
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/tools/rdfpipe.py", line 56, in parse_and_serialize
        graph.serialize(destination=outfile, format=output_format, **kws)
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/graph.py", line 968, in serialize
        serializer.serialize(stream, base=base, encoding=encoding, **args)
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 247, in serialize
        if self.statement(subject) and not firstTime:
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 314, in statement
        return self.s_squared(subject) or self.s_default(subject)
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 318, in s_default
        self.path(subject, SUBJECT)
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 333, in path
        or self.p_default(node, position, newline)):
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 339, in p_default
        self.write(self.label(node, position))
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 355, in label
        return self.getQName(node, position == VERB) or node.n3()
      File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/term.py", line 254, in n3
        raise Exception('"%s" does not look like a valid URI, I cannot serialize this as N3/Turtle. Perhaps you wanted to urlencode it?'%self)
    Exception: "http://example.com/with space:" does not look like a valid URI, I cannot serialize this as N3/Turtle. Perhaps you wanted to urlencode it?
    {"@context": {"example":"http://example.com/"}, "@id": "example:with space:", "example:key": "value"}
    I guess not :think:
    Why can't people just use URIs :(
    why do they have to go invent their own thing
    Iwan Aucamp
    @aucampia
    I will hack rdflib to make it work for now I guess
    just URLescape the fragment after the prefix
    so annoying
    thanks for all the help by the way Gregg
    Didac
    @umbreak

    Hi everyone. I have a question concerning the returned @context when framing.

    I could find that for compact, on the JsonLdProcessor 9.3 says:

    If context was not null, add an @context entry to compacted output and set its value to the provided context.

    But I could not find anything similar in framing. So If I pass the following json

    {
       "@id": "http://schema.org/myId",
       "@type": "http://schema.org/mytype"
    }

    With the following framing:

    {
       "@id": "http://schema.org/myId",
       "@context": "http://schema.org/"
    }

    Where in the algorithm says if I should expect the response to contain the same @context as the framing or the resolved @context (so all the schema.org context) ?

    Iwan Aucamp
    @aucampia
    any inputs here: digitalbazaar/pyld#137 ?
    Iwan Aucamp
    @aucampia
    Made a PR, any feedback is welcome: digitalbazaar/pyld#138
    Didac
    @umbreak
    I guess I found it, in the JsonLdProcessor step 19.3
    Jonathan
    @johnthu_twitter
    hi friends, if I want to extract json-ld info from some web pages, what could be easiest method?
    Gregg Kellogg
    @gkellogg
    JSON-LD 1.1 specifies how to extract JSON-LD from HTML; the Ruby tool (which you can demo through http://rdf.greggkellogg.net/distiller) does this. I don't believe that support has been incorporated into jsonld.js or pyld quite yet; work's done, but, there are some packaging considerations they need to work out. /cc @davidlehn
    Didac
    @umbreak
    Is someone mantaining the Json-LD Java present here? I’d like them to review&merge the PR that fixes an issue with recursive remoteContexts: jsonld-java/jsonld-java#303
    iwan.aucamp
    @iwan.aucamp:matrix.org
    [m]
    Iwan Aucamp
    @aucampia
    ah, well, that is awkward
    Iyanuoluwa (Elijah) Raji
    @iraji1
    Hey Everyone, I've been trying to build out a JSON-LD Sample based on some dummy data and I'm having issues. Is there anyone that can assist
    Iwan Aucamp
    @aucampia
    @iraji1 I'm sure there is someone that can help, but you have to say what the problem is
    gnoric
    @gnoric
    Hi guys, anyone here? I got a question for you json-ld experts :)
    is there any way (including frames) to inherit a relationship, say: if child of, and child of, then grandchild of! Or is the only way to modify the original json?
    {
        "@id"     : "Model 1",
        "@type"    : "abc:model",
        "entities" : [
            {
                "@id"     : "Entity 1",
                "@type"    : "abc:entitiy",
                "attributes" : [
                    {
                        "@id"     : "Attribute 1",
                        "@type"    : "abc:attribute"
                    }
                ]
            }
        ]
    }
    gnoric
    @gnoric
    is there any possibility to say that Attribute 1 is in Model 1 without altering the json?
    Gregg Kellogg
    @gkellogg
    I answered the question in a private response. Might want to work in the RDF domain with RDFS/OWL inferrence or SPARQL Update then re-serialize as JSON-LD.
    gnoric
    @gnoric
    @gkellogg Thank you so much for taking the time to respond! <3
    Blake Regalia
    @blake-regalia
    does anyone recall discussions about the term canonicalization vs normalization and why one is preferred over the other ?
    Gregg Kellogg
    @gkellogg
    Regarding federated queries; JSON-LD isn't really a query language (although framing includes some filtering aspects). SPARQL is the appropriate standard to look to for doing federated queries, and the results can be formatted as JSON-LD.
    Re canonicalization vs. normalization, I consider them to be synonyms, with canonicalization (C14N) more common. There is a proposed Working Group that would include this work: https://w3c.github.io/lds-wg-charter/, which now uses the RDF Dataset Canonicalization naming, rather than the former RDF Dataset Normalization naming.
    Mark Foster
    @mfosterio
    @gkellogg Can JSON-LD be converted to rdfs and then queried by SPARQL?
    Mark Foster
    @mfosterio
    @gkellogg I am still learning these technologies. I was assuming that the conversion to N-Quads was triples with a graph dimension. https://json-ld.org/playground/ https://stackoverflow.com/questions/38112473/how-to-import-and-query-4-column-n-quad-quadruples-into-blazegraph
    Adrian Gschwend
    @ktk
    @mikcaweb JSON-LD is RDF and you can load it to most stores that provide SPARQL
    RDFS is the schema part, RDF is the "model" itself