lanthaler / JsonLD

JSON-LD processor for PHP
MIT License
336 stars 61 forks source link

How json minify? #74

Closed Yuriy-Svetlov closed 7 years ago

Yuriy-Svetlov commented 7 years ago

How make json minify?

lanthaler commented 7 years ago

Could you please elaborate on what exactly you wanna do why and what you would expect from this library?On Feb 8, 2017 10:00 AM, semiromid notifications@github.com wrote:How make json minify?

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

Yuriy-Svetlov commented 7 years ago

I want from

    "item": {
      "@id": "https://example.com/books/authors",
      "name": "Authors",
    }

get "item": {"@id": "https://example.com/books/authors","name": "Authors", "image":"http://example.com/images/icon-author.png"}

I want compressed json

lanthaler commented 7 years ago

JsonLD::toString($yourData, false) does just that. The second parameter defines whether to pretty-print or not.