Beispiel #1
0
Datei: api.py Projekt: rowhit/h
def read_jsonld(context, request):
    request.response.content_type = 'application/ld+json'
    request.response.content_type_params = {
        'profile': AnnotationJSONLDPresenter.CONTEXT_URL
    }
    presenter = AnnotationJSONLDPresenter(context)
    return presenter.asdict()
Beispiel #2
0
def read_jsonld(context, request):
    request.response.content_type = "application/ld+json"
    request.response.content_type_params = {
        "charset": "UTF-8",
        "profile": str(AnnotationJSONLDPresenter.CONTEXT_URL),
    }
    presenter = AnnotationJSONLDPresenter(context)
    return presenter.asdict()
Beispiel #3
0
def read_jsonld(context, request):
    request.response.content_type = "application/ld+json"
    request.response.content_type_params = {
        "charset": "UTF-8",
        "profile": str(AnnotationJSONLDPresenter.CONTEXT_URL),
    }
    presenter = AnnotationJSONLDPresenter(context)
    return presenter.asdict()
Beispiel #4
0
def read_jsonld(context, request):
    request.response.content_type = "application/ld+json"
    request.response.content_type_params = {
        "charset": "UTF-8",
        "profile": str(AnnotationJSONLDPresenter.CONTEXT_URL),
    }

    return AnnotationJSONLDPresenter(
        context.annotation, links_service=request.find_service(name="links")
    ).asdict()
Beispiel #5
0
Datei: api.py Projekt: gnott/h
def read_jsonld(context, request):
    request.response.content_type = 'application/ld+json'
    request.response.content_type_params = {
        'profile': AnnotationJSONLDPresenter.CONTEXT_URL}
    presenter = AnnotationJSONLDPresenter(context)
    return presenter.asdict()