Seenthis
•
 
Identifiants personnels
  • [mot de passe oublié ?]

 
  • #j
  • #js
RSS: #json

#json

  • #jsonp
  • #json-ld
  • #json-schema
  • #json-server
  • #json-mapping
  • #json-web-token
  • #json2csv
  • #jsonfeed
  • #json_encode
  • #json.human.js
0 | 25 | 50 | 75 | 100
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 16/06/2025
    1
    @spip
    1

    PHP : Constantes pré-définies - Manual
    ▻https://www.php.net/manual/fr/json.constants.php#115783

    Valeurs numériques des constantes utilisées comme flags en 2ème paramètre de la fonction json_encode()
    en SPIP il ne semble pas possible d’utiliser la forme chaîne de caractères de la constante (JSON_NUMERIC_CHECK par ex) lorsqu’on passe json_encode en filtre d’une #BALISE. En revanche la forme numérique de cette constante est OK

    Exemple : pour forcer le retour d’une valeur numérique (int) à la place de :

    [(#PATATE|json_encode{JSON_NUMERIC_CHECK})]

    on utilisera :

    [(#PATATE|json_encode{32})]

    #json_encode #SPIP #PHP #JSON #FLAGS #valeur_numérique

    cy_altern @cy_altern CC BY-SA
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 16/06/2025

      Ce n’est pas une bonne idée, car l’implémentation derrière peut changer, ce pourquoi justement il y a des noms de variables humains, sémantiques. Il faut utiliser #CONST{JSON_NUMERIC_CHECK}

      RastaPopoulos @rastapopoulos CC BY-NC
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 18/06/2025

      ah oui, effectivement...
      ...mais ça ne simplifie pas l’écriture :-(

      cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 7/09/2023
    5
    @rastapopoulos
    @monolecte
    @simplicissimus
    @7h36
    @olaf
    5

    GitHub - noborus/trdsql : CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
    ▻https://github.com/noborus/trdsql

    Un outil en CLI (WIndows/Linux/MacOS) qui permet d’exécuter des requêtes SQL avec la syntaxe MySQL sur tout un tas de sources : CSV, JSON, MD,... mais aussi MySQL
    – propose différents formats de sortie
    – permet d’utiliser plusieurs fichiers en entrée

    #trdsql #MySQL #csv #json

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 6/05/2022
    1
    @cy_altern
    1

    MF-JSON update & tutorial with official sample | Free and Open Source GIS Ramblings
    ▻https://anitagraser.com/2022/04/23/mf-json-update-tutorial-with-official-sample

    https://underdark.files.wordpress.com/2022/04/windtraj.png

    Since last week’s post, I’ve learned that there is an official OGC #Moving #Features #JSON Encodings repository with more recent sample datasets, including MovingPoint, MovingPolygon, and Trajectory JSON examples.

    Exemple de données :

    {
      "type" : "Feature",
      "temporalGeometry" : {
        "type" : "MovingPoint",
        "coordinates" : [ [ 111.9, 7.6 ], [ 111.3, 7.3 ], [ 111.1, 7.0 ], [ 110.7, 6.6 ], [ 110.2, 6.3 ], [ 109.9, 6.0 ], [ 109.5, 5.8 ], [ 108.6, 5.9 ], [ 108.0, 6.2 ], [ 107.0, 6.3 ], [ 105.8, 6.0 ], [ 105.0, 5.8 ], [ 104.1, 6.1 ], [ 103.4, 6.8 ], [ 102.5, 7.5 ], [ 101.5, 7.9 ], [ 100.8, 8.1 ], [ 100.1, 8.2 ], [ 99.4, 8.4 ] ],
        "datetimes" : [ "2018-12-31T06:00:00Z", "2018-12-31T12:00:00Z", "2018-12-31T18:00:00Z", "2019-01-01T00:00:00Z", "2019-01-01T06:00:00Z", "2019-01-01T12:00:00Z", "2019-01-01T18:00:00Z", "2019-01-02T00:00:00Z", "2019-01-02T06:00:00Z", "2019-01-02T12:00:00Z", "2019-01-02T18:00:00Z", "2019-01-03T00:00:00Z", "2019-01-03T06:00:00Z", "2019-01-03T12:00:00Z", "2019-01-03T18:00:00Z", "2019-01-04T00:00:00Z", "2019-01-04T06:00:00Z", "2019-01-04T12:00:00Z", "2019-01-04T18:00:00Z" ],
        "interpolation" : "Linear"
      },
      "temporalProperties" : [ {
        "datetimes" : [ "2018-12-31T06:00:00Z", "2018-12-31T12:00:00Z", "2018-12-31T18:00:00Z", "2019-01-01T00:00:00Z", "2019-01-01T06:00:00Z", "2019-01-01T12:00:00Z", "2019-01-01T18:00:00Z", "2019-01-02T00:00:00Z", "2019-01-02T06:00:00Z", "2019-01-02T12:00:00Z", "2019-01-02T18:00:00Z", "2019-01-03T00:00:00Z", "2019-01-03T06:00:00Z", "2019-01-03T12:00:00Z", "2019-01-03T18:00:00Z", "2019-01-04T00:00:00Z", "2019-01-04T06:00:00Z", "2019-01-04T12:00:00Z", "2019-01-04T18:00:00Z" ],
        "preasure" : {
          "type" : "Measure",
          "values" : [ 1004.0, 1004.0, 1004.0, 1004.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 998.0, 996.0, 996.0, 996.0, 1000.0, 1006.0 ],
          "form" : "A97",
          "interpolation" : "Linear"
        },
        "wind" : {
          "type" : "Measure",
          "values" : [ 0.0, 0.0, 0.0, 0.0, 35.0, 35.0, 35.0, 35.0, 35.0, 35.0, 35.0, 35.0, 35.0, 40.0, 45.0, 45.0, 45.0, 40.0, 0.0 ],
          "form" : "KNT",
          "interpolation" : "Linear"
        },
        "class" : {
          "type" : "Measure",
          "values" : [ 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 2.0 ],
          "interpolation" : "Linear"
        }
      } ]
    }

    ▻https://github.com/opengeospatial/mf-json

    #mf-json #map

    b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @rastapopoulos
    RastaPopoulos @rastapopoulos CC BY-NC 21/04/2022

    On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My ! - Kevin Sookocheff
    ▻https://sookocheff.com/post/api/on-choosing-a-hypermedia-format

    Un article qui compare 4 manières de structurer une API en JSON : JSON-LD, HAL, JSON:API, Collection+JSNO. Mais c’était en 2014. Depuis il me semble que JSON-LD est devenu plus important que JSON:API, niveau « leading format ».

    To solve these problems we can look at how we structure our API responses. By using hypermedia in our responses we can offer links between API endpoints and documentation, potential actions, and related endpoints. This allows for discoverable APIs where it is clear from the API response the set of next actions that a client may want to take. Furthermore, by standardizing on a hypermedia type clients developed for one API can understand the format of another API and communicate with minimal duplicated effort.

    In this post I will evaluate a few mature hypermedia types for APIs, offering a side-by-side comparison of their strengths and weaknesses. If you are impatient for the final result you can jump straight to the code.

    #API #JSON #développement #web #hypermedia

    RastaPopoulos @rastapopoulos CC BY-NC
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 22/02/2022
    3
    @rastapopoulos
    @tofulm
    @marcimat
    3

    portabletext/portabletext: Portable Text is a JSON based rich text specification for modern content editing platforms.
    ►https://github.com/portabletext/portabletext

    Portable Text is a JSON based rich text specification for modern content editing platforms.
    Portable Text is an agnostic abstraction of rich text that can be serialized into pretty much any markup language, be it HTML, Markdown, SSML, XML, etc. It’s designed to be efficient for real-time collaborative interfaces, and makes it possible to annotate rich text with additional data structures recursively.
    Portable Text is built on the idea of rich text as an array of blocks, themselves arrays of children spans. Each block can have a style and a set of mark definitions, which describe data structures distributed on the children spans. Portable Text also allows for inserting arbitrary data objects in the array, only requiring _type-key. Portable Text also allows for custom content objects in the root array, enabling editing- and rendering environments to mix rich text with custom content types.

    #Portable_Text #rich_text #json #block #contenu_structuré

    cy_altern @cy_altern CC BY-SA
    • @biggrizzly
      BigGrizzly @biggrizzly CC BY-NC-SA 22/02/2022

      #un_de_plus :-)

      BigGrizzly @biggrizzly CC BY-NC-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 24/11/2021

    Hotel Schema Examples - Online Ownership
    ▻https://onlineownership.com/hotel-schema-examples

    Exemples de données structurées au format json selon schema.org pour hôtel, restaurant, bar...

    #données_structurées #json #schema.org

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @b_b
    b_b @b_b PUBLIC DOMAIN 10/11/2021
    4
    @rastapopoulos
    @marcimat
    @cy_altern
    @tofulm
    4

    MistQL | MistQL
    ▻https://mistql.com

    A miniature embeddable language for performing computations on JSON-like structures. MistQL uses a simple syntax to chain together complicated expressions in a fluent, easy to read manner. Readability is a major goal of MistQL.

    Exemples : events | filter type == "submit" | count ; events | groupby type | mapvalues count, etc

    Démo ▻https://www.mistql.com/tryitout

    #json et en rapport avec #jq

    b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 14/07/2021
    1
    @spip
    1

    SleekDB - PHP NoSQL Flat File Database
    ▻https://sleekdb.github.io

    SleekDB is a simple flat file NoSQL like database implemented in PHP without any third-party dependencies that store data in plain JSON files.

    Une solution possible pour remplacer les sauvegardes Sqlite de SPIP qui nécessitent l’extension sqlite de PHP.

    Le repo Github : ▻https://github.com/rakibtg/SleekDB

    #sleekdb #noSQL #sauvegarde #SPIP #json

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 2/12/2020

    JSON Lines
    ▻https://jsonlines.org

    un format de stockage/échange pour JSON (semble un peu manquer d’implémentations dans les langages courants)
    Convertisseur vers JSON (npm) : ▻https://www.npmjs.com/package/jsonlines2json

    #json #javascript

    cy_altern @cy_altern CC BY-SA
    • @severo
      severo @severo PUBLIC DOMAIN 2/12/2020

      C’est pareil que ndjson ?

      Mike Bostock l’utilisait dans ses super articles sur l’utilisation de la ligne de commandes pour manipuler des données géographiques :

      ▻https://medium.com/@mbostock/command-line-cartography-part-2-c3a82c5c0f3

      severo @severo PUBLIC DOMAIN
    • @fil
      Fil @fil 2/12/2020

      je vois pas de différence ▻http://ndjson.org

      Fil @fil
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 3/10/2020

    zevero/simpleWebstorage: Clean interface for localStorage / sessionStorage
    ▻https://github.com/zevero/simpleWebstorage

    A clean interface for localStorage / sessionStorage in <20 lines of code.

    Usage :

    localStorage.set('myKey',{a:[1,2,5], b: 'ok'}); //can set a json Object
    localStorage.assign('myKey',{a:[6], c:42});     //shallow merge using Object.assign
    localStorage.has('myKey');                      // --> true
    localStorage.get('myKey');                      // --> {a:[6], b: 'ok', c:42}
    localStorage.keys();                            // --> ['myKey']
    localStorage.remove('myKey');                   // -

    #localStorage #sessionStorage #API #JSON

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 20/05/2020
    1
    @tofulm
    1

    websanova/vue-store: A simple light-weight Vue “store” alternative to vuex.
    ▻https://github.com/websanova/vue-store

    Vue Store: a simple easy access store utility for Vue.js

    #vuejs #store #javascript #json

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 19/05/2020
    6
    @spip
    @tofulm
    @rastapopoulos
    @monolecte
    @gblin
    @7h36
    6

    Editor.js
    ▻https://editorjs.io

    Un éditeur de texte pour appli web, structuré en mode « blocs » et avec une sortie en JSON (semblerait un bon candidat pour un éditeur moderne pour SPIP...)

    Key features:
    – It is a block-styled editor
    – It returns clean data output in JSON
    – Designed to be extendable and pluggable with a simple API

    What does it mean «block-styled editor»
    Workspace in classic editors is made of a single contenteditable element, used to create different HTML markups. Editor.js workspace consists of separate Blocks: paragraphs, headings, images, lists, quotes, etc. Each of them is an independent contenteditable element (or more complex structure) provided by Plugin and united by Editor’s Core.
    There are dozens of ready-to-use Blocks and the simple API for creation any Block you need. For example, you can implement Blocks for Tweets, Instagram posts, surveys and polls, CTA-buttons and even games.

    What does it mean clean data output
    Classic WYSIWYG-editors produce raw HTML-markup with both content data and content appearance. On the contrary, Editor.js outputs JSON object with data of each Block. You can see an example below
    Given data can be used as you want: render with HTML for Web clients, render natively for mobile apps, create markup for Facebook Instant Articles or Google AMP, generate an audio version and so on.

    #éditeur #editorjs #SPIP #edition_bloc #json #WYSIWYG

    cy_altern @cy_altern CC BY-SA
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 20/05/2020

      J’ai regardé un peu hier, le fonctionnement, la doc API, etc, et de ce que je comprends, ce projet est en gros le principe de l’éditeur Gutenberg de WP mais en autonome. Et pour l’instant de ce que j’ai vu, il a beau avoir un format pivot JSON abstrait au milieu, il n’est conçu que pour générer du HTML au final. Mais peut-être que j’ai mal cherché…

      Ce qui n’est pas le cas de ProseMirror, dont le but c’est bien d’éditer en web un format pivot JSON mais en pouvant produire n’importe quoi en sortie du moment qu’il y a un générateur de tel type (html, ou markdown, ou SPIP, ou etc).
      Cf
      ►https://seenthis.net/messages/693664
      et
      ▻https://seenthis.net/messages/651447

      RastaPopoulos @rastapopoulos CC BY-NC
    Écrire un commentaire
  • @stephane
    Stéphane Bortzmeyer @stephane CC BY-SA 13/04/2020
    7
    @simplicissimus
    @kent1
    @ericw
    @severo
    @cy_altern
    @7h36
    @die_brucke
    7

    La carte des #câbles_sous_marins utilisant #OpenStreetMap :

    ▻https://framacarte.org/fr/map/submarine-cable-map_72142

    (Les autres cartes existantes utilisent toutes le privateur capitaliste Google Maps.)

    Stéphane Bortzmeyer @stephane CC BY-SA
    • @stephane
      Stéphane Bortzmeyer @stephane CC BY-SA 13/04/2020

      Et les explications techniques, pour les mordus de #cartographie et d’#OpenData #JSON avec #jq : ▻http://shaarli.guiguishow.info/?UJyNPw

      Stéphane Bortzmeyer @stephane CC BY-SA
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 13/04/2020

      pas très fluide et complètement coupé en plein milieu du pacifique :(

      RastaPopoulos @rastapopoulos CC BY-NC
    • @b_b
      b_b @b_b PUBLIC DOMAIN 14/04/2020

      Une autre version ici ▻https://observablehq.com/@ariellemartinez/submarine-cable-map et des données pour s’amuser par là ▻https://github.com/telegeography/www.submarinecablemap.com

      b_b @b_b PUBLIC DOMAIN
    • @stephane
      Stéphane Bortzmeyer @stephane CC BY-SA 15/04/2020
      @rastapopoulos

      @rastapopoulos La coupure au milieu du Pacifique est due au fait que, contrairement à Google, umap ne semble pas répéter indéfiniment les données. Le fond de carte se répète, mais pas les données.

      Stéphane Bortzmeyer @stephane CC BY-SA
    • @stephane
      Stéphane Bortzmeyer @stephane CC BY-SA 23/08/2021

      Des nouveautés ! ▻http://shaarli.guiguishow.info/?xlcSCQ

      Stéphane Bortzmeyer @stephane CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 5/02/2020
    3
    @b_b
    @tofulm
    @spip
    3
    @azerttyu

    ▻https://git.spip.net/explore/organizations

    Récupérer les données détaillées des repos git de SPIP au format JSON :
    – le core : ▻https://git.spip.net/api/v1/orgs/spip/repos
    – les plugins : ▻https://git.spip.net/api/v1/orgs/spip-contrib-extensions/repos
    – les squelettes : ▻https://git.spip.net/api/v1/orgs/spip-contrib-squelettes/repos
    – les thèmes : ▻https://git.spip.net/api/v1/orgs/spip-contrib-themes/repos
    – les outils : ▻https://git.spip.net/api/v1/orgs/spip-contrib-outils/repos
    – galaxie : ▻https://git.spip.net/api/v1/orgs/spip-galaxie/repos

    (source : ▻https://git.spip.net/spip-contrib-outils/git_loader/src/branch/master/git_loader.sh#L81
    merci @azerttyu )

    #SPIP #git.spip.net #json #plugins

    cy_altern @cy_altern CC BY-SA
    • @amin
      net2 @amin 10/02/2020

      I would thank you for your helpful advice i didn’t even know . thanks

      net2 @amin
    • @jeanmarie
      jeanmarie @jeanmarie CC BY-NC-SA 12/02/2020
      @seenthis

      @seenthis « Spam, spam, spam » (+ émoji notes de musique)

      jeanmarie @jeanmarie CC BY-NC-SA
    • @b_b
      b_b @b_b PUBLIC DOMAIN 12/02/2020
      @jeanmarie @amin

      @jeanmarie je doute sur la teneur en spam du compte @amin je laisse l’équipe décider sur ce point.

      b_b @b_b PUBLIC DOMAIN
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 13/02/2020
      @b_b

      @b_b : il a quand même 2 symptômes « types » des comptes de spammeurs :
      – son pseudo est identique au nom de son site (net2.com)
      – ses billets n’ont référencé que son site

      cy_altern @cy_altern CC BY-SA
    • @b_b
      b_b @b_b PUBLIC DOMAIN 13/02/2020
      @cy_altern

      @cy_altern je vous laisse en débattre sur la liste seenthis et me signaler s’il est nécessaire de supprimer le compte.

      /me retourne faire des cartons...

      b_b @b_b PUBLIC DOMAIN
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 6/08/2019
    1
    @tofulm
    1

    Unserialize - PHP, JSON, Base64
    ▻https://www.unserialize.com

    Utilitaire en ligne pour désérialiser des données sérialisées en JSon ou PHP serialize

    #outil #web_dev #unserialize #serialiser #json

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 24/06/2019
    1
    @spip
    1

    Open Source / apibridge · GitLab
    ▻https://git.nursit.net/open/apibridge

    API Bridge
    Point d’entrée pour échanger des données (json par défaut) avec un site SPIP ou entre deux sites SPIP
    Fonctionnement
    S’appuie sur des appels HTTP à bridge.api (mais peut être étendu à d’autres noms d’actions facilement). Les urls xxx.api appellent chez SPIP automatiquement les fichiers action/api_xxx.php. C’est donc le fichier action/api_bridge.php qui s’occupe de l’analyse de la requête et d’émettre la réponse.
    Exemples d’appels simples :
    ▻https://domain.tld/bridge.api/v1/ping
    ▻https://domain.tld/bridge.api/v1/ping/timestamp

    #SPIP #API #json #web_dev

    • #Open Source
    cy_altern @cy_altern CC BY-SA
    • @jeanmarie
      jeanmarie @jeanmarie CC BY-NC-SA 24/06/2019

      #spip_blog

      jeanmarie @jeanmarie CC BY-NC-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 3/04/2019
    5
    @tofulm
    @b_b
    @reka
    @sodaa
    @rastapopoulos
    5

    Données sémantiques, structurées et associées, le choix JSON-LD - Alsacreations
    ▻https://www.alsacreations.com/article/lire/1780-donnees-semantiques-structurees-associees-le-choix-JSON-LD.html

    JSON-LD est une adaptation de JSON qui permet de servir des données associées (utilisant un vocabulaire défini par avance) et structurées sur le Web.
    Successeur des microformats / microdatas HTML5, semble bien parti pour devenir LE format des données sémantiques sur le web.

    Voir aussi :
    – la doc de Google dev pour les « données structurées » en tant qu’élément fondamental dans le référencement d’un site : ▻https://developers.google.com/search/docs/guides/intro-structured-data
    – la dernière version de la spécification du w3c : ▻https://w3c.github.io/json-ld-syntax

    #JSON-LD #données_structurées #microformat #microdata #référencement #web_sémantique

    cy_altern @cy_altern CC BY-SA
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 3/04/2019

      C’est pas tant que le successeur des microdatas : ça utilise le même registre schema.org comme vocabulaire de description des données. Mais dans un cas c’est embed dans le HTML, et dans l’autre c’est dans un document à part. Ça dépend des utilisations.

      RastaPopoulos @rastapopoulos CC BY-NC
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 11/02/2019

    JSON Web Tokens (JWT) Demystified
    ▻https://hackernoon.com/json-web-tokens-jwt-demystified-f7e202249640?source=rss----3a8144eabfe3-

    https://cdn-images-1.medium.com/max/1024/1*zDUa3wiFQft0ILDZJfn9JQ.png

    JSON Web Token (JWT, often pronounced “jot”) is a powerful tool for confidently transmitting data between two parties through tokens. These parties can consist of users, servers, or any other combination of services. Based on an open standard (RFC-7519), JWTs are digitally signed with an encryption algorithm, so the receiving party can trust the information contained within. In computer #security this concept is known as Data Integrity.One main benefit of using a #jwt is that it’s very compact (assuming the issuer uses JWS Compact Serialization, which is recommended). They are generally small enough to be sent through a POST request, in an HTTP Header, or even as a query string within a URL. However, the more claims you add to a JWT, the more bloated it becomes. You could theoretically (...)

    #coding #json-web-token #nodejs

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 28/12/2018

    Create a Go #json #parser: Batteries Included
    ▻https://hackernoon.com/create-a-go-json-parser-batteries-included-9d02d09fe508?source=rss----3a

    https://cdn-images-1.medium.com/max/1024/1*CeP3A7A60m6Osl8miEkksQ.jpeg

    The inspiration for this post came from a project at work. I was building a service that required the comparison of two Json objects. The catch was that I needed to be able to replace keys, filter out paths, and apply comparison functions to specific nodes.Obviously, a standard library comparison function such as reflect.DeepEqual() would not work. ?The solution was to build a AST(Abstract Syntax Tree) modeled off of the Json objects. Every Node in the tree represents either a string, integer, array, or object.By doing this I would allow for the flexibility to more easily apply algorithms onto the data.To build this we’ll start with the Lexer to generate Tokens. Then move onto the Parser which will take the tokens and match them to Json grammar. Finally, we’ll add AST hooks to generate the (...)

    #golang #go-json-parser #programming

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 18/09/2018

    marine/proxy.php at master · brunob/marine · GitHub
    ▻https://github.com/brunob/marine/blob/master/proxy.php

    Script: Simple PHP Proxy: Get external HTML, JSON and more!

    une alternative à l’intégration de contenus externes par iframe.
    A interfacer avec le plugin Querypath ►https://contrib.spip.net/Query-Path pour manipuler à la volée le contenu récupéré

    #proxy #php #json #iframe #querypath #contenu_distant

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 30/08/2018

    JSON Formatter & Validator
    ▻https://jsonformatter.curiousconcept.com

    un débogueur de json en ligne

    #json #web_dev #debogage #outil

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 1/08/2018

    How to send the #json data from a #drupal 8 site?
    ▻https://hackernoon.com/how-to-send-the-json-data-from-a-drupal-8-site-306145e5f5a1?source=rss--

    https://cdn-images-1.medium.com/max/1024/0*FNhV1MgZNLvYk50v.png

    By ADCI SolutionsImagine a situation: your mobile application needs to get some information from your site on Drupal 8 using JSON. Why JSON? Why not XML? My client needed the data in the JSON format, but still, why choose JSON in our case? On the client application side, JSON data processing is very simple. On the other hand, the data sent in JSON format can have security problems. So it’s better to use XML on the server and JSON for the client-side.How to do it without much effort and installing additional modules, how to change the JSON array programmatically, and send the JSON data with and without using Views — all of these you will learn from this article.Several ways to create and send data in the JSON format in Drupal 8Good news! You do not need to write code or download additional (...)

    #api #send-json-data #drupal-8

    • #JSON
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 15/05/2018

    Swift Codability
    ▻https://hackernoon.com/swift-codability-d0d232065cad?source=rss----3a8144eabfe3---4

    Ever tried to parse #json in swift? I know! right, the sheer magnitude of boilerplate with so many nil checks makes it a really bad experience.I am here to provide you a solution to this problem with the newly introduced Swift 4, with it Apple has finally answered the question of parsing JSON painlessly.Let’s start with the basicsLet’s take a basic JSON structure▻https://medium.com/media/51286e1285e65abf3240eb22418ee1f4/hrefOur swift mapping model will look something like this:▻https://medium.com/media/febe5cc059eea4e8d910c4c22d6e6f0d/hrefAnd to convert this JSON data to our model, this is literally all the code that we have to write▻https://medium.com/media/da8cac90b87ddbd6913f047e4ab5d57a/hrefYou can encode this model to JSON as (...)

    #encoding-decoding #codable #json-mapping #swift-4

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @mist_
    Mist. GraphX @mist_ 12/05/2018
    4
    @rastapopoulos
    @spip
    @cy_altern
    @tofulm
    4

    Retour d’experience sur le developement d’un éditeur rich text, axé rédaction digital, pour le NYT.
    manipulation DOM, Utilise ProseMirror, intéressant pour la structuration des blocs imbriqués de contenu…

    Building a Text Editor for a Digital-First Newsroom

    ▻https://open.nytimes.com/building-a-text-editor-for-a-digital-first-newsroom-f1cb8367fc21

    #editeur#richtext

    Mist. GraphX @mist_
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 13/05/2018

      ►https://seenthis.net/messages/693664

      #prosemirror

      C’est exactement ce qu’il faut et que j’attends depuis des années, même après que Wikipedia ait codé son éditeur wysiwyg mais qui enregistre en une autre syntaxe après (càd ça ne produit pas du html). Sauf que wikimedia l’a codé que pour eux, pas en lib générique.

      Or là Prosemirror est vraiment une lib générique qui montre à l’utilisateur un éditeur #wysiwyg MAIS qui produit un format pivot intermédiaire en JSON, de données structurées, qui peut donc ensuite être utilisé pour produire n’importe quoi, et alors enregistrer en SPIP en Markdown ou n’importe quoi d’autre…

      This is the future !

      #idée_pour_SPIP

      RastaPopoulos @rastapopoulos CC BY-NC
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 13/05/2018

      Le site officiel du « moteur » sous ce projet : ProseMinor
      ►http://prosemirror.net

      Et pour en rajouter une couche sur les possibilités de ProseMinor vis à vis des fonctionnalités d’édition de SPIP : ▻https://prosemirror.net/examples/dino
      qui donne un exemple d’intégration d’un nouvel objet éditorial (ici un dinosaure) tout à fait similaire aux modèles SPIP...

      #json #ProseMirror #éditeur #SPIP #WYSIWYG

      cy_altern @cy_altern CC BY-SA
    • @b_b
      b_b @b_b PUBLIC DOMAIN 14/05/2018
      @rastapopoulos

      @rastapopoulos paye ton ticket ? (tant que core.spip.net tourne toujours ^^)

      b_b @b_b PUBLIC DOMAIN
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 15/05/2018

      J’avais fait un ticket sur le développement d’un éditeur basé sur CodeMirror déjà, mais pour faire du WYSIWYM donc. Là c’est une autre piste du coup. Donc autre ticket… ou bien transformation du précédent en complétant pour présenter les deux pistes (et peut-être même que les deux pourraient être bien à la fois, car quand on a un éditeur WYSIWYG, il faut toujours avoir aussi un éditeur de source en parallèle, et alors autant qu’il soit WYISWYM tant qu’à faire…)

      ►https://core.spip.net/issues/3720

      RastaPopoulos @rastapopoulos CC BY-NC
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 22/02/2022
      @rastapopoulos

      le ticket de @rastapopoulos est maintenant ici : ▻https://git.spip.net/spip/porte_plume/issues/3720

      cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @nhoizey
    Nicolas Hoizey @nhoizey CC BY-NC-SA 17/04/2018
    2
    @rastapopoulos
    @cy_altern
    2

    What’s in the Drupal 8 Roadmap?
    ▻https://www.ostraining.com/blog/drupal/drupal-8-roadmap

    "In the past, Drupal’s release cycles were vague. “It will be ready when it’s ready” was a favorite quote. That was not the approach that Dries took in Nashville. Instead, he presented a very specific roadmap for where Drupal is headed."

    #Drupal_D8_roadmap_layout_JSONAPI_MediaLibrary_clevermarks

    Nicolas Hoizey @nhoizey CC BY-NC-SA
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 17/04/2018

      https://www.ostraining.com/cdn/images/drupal8/roadmap/drupal-8-roadmap.jpg

      ▻https://www.drupal.org/project/ideas/issues/2811175

      ▻https://www.drupal.org/docs/8/api/layout-api

      #drupal #roadmap #layout #interface #API #JSON

      RastaPopoulos @rastapopoulos CC BY-NC
    Écrire un commentaire
0 | 25 | 50 | 75 | 100

Thèmes liés

  • #json
  • technology: json
  • #api
  • #rfc
  • #web
  • #javascript
  • #spip
  • #développement
  • #map
  • #data
  • #php
  • #rest
  • #csv
  • #jq
  • #outil
  • #json-ld
  • #cartographie
  • company: google
  • #spip
  • #http
  • #geojson
  • #xml
  • #schema.org
  • #web_dev
  • #api
  • technology: xml
  • programminglanguage: xml
  • technology: api
  • #rss
  • #tutoriel
  • #csv
  • #svg
  • #xml
  • #données_structurées
  • #éditeur
  • #wysiwyg
  • #json-ld
  • #php
  • #drupal
  • #editeur