# SOME DESCRIPTIVE TITLE. # Copyright (C) 1990-2016, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 2.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-10-30 10:44+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../Doc/library/json.rst:2 msgid ":mod:`json` --- JSON encoder and decoder" msgstr ":mod:`json` --- Encodage et décodage JSON" #: ../Doc/library/json.rst:10 msgid "" "`JSON (JavaScript Object Notation) `_, specified by :rfc:" "`7159` (which obsoletes :rfc:`4627`) and by `ECMA-404 `_, is a lightweight " "data interchange format inspired by `JavaScript `_ object literal syntax (although it is not a strict subset " "of JavaScript [#rfc-errata]_ )." msgstr "" "`JSON (JavaScript Object Notation) `_, spécifié par la :rfc:" "`7159` (qui rend la :rfc:`4627` obsolète) et par le standard `ECMA-404 " "`_, " "est une interface légère d'échange de données inspirée par la syntaxe des " "objets littéraux `JavaScript `_ " "(bien que ce ne soit pas un sous-ensemble strict de Javascript [#rfc-" "errata]_ )." #: ../Doc/library/json.rst:17 msgid "" ":mod:`json` exposes an API familiar to users of the standard library :mod:" "`marshal` and :mod:`pickle` modules." msgstr "" ":mod:`json` expose une API familière aux utilisateurs des modules de la " "bibliothèque standard :mod:`marshal` et :mod:`pickle`." #: ../Doc/library/json.rst:20 msgid "Encoding basic Python object hierarchies::" msgstr "Encodage d'objets Python basiques : ::" #: ../Doc/library/json.rst:39 msgid "Compact encoding::" msgstr "Encodage compact : ::" #: ../Doc/library/json.rst:45 msgid "Pretty printing::" msgstr "Affichage élégant : ::" #: ../Doc/library/json.rst:55 msgid "Decoding JSON::" msgstr "Décodage JSON : ::" #: ../Doc/library/json.rst:67 msgid "Specializing JSON object decoding::" msgstr "Spécialisation du décodage JSON pour un objet : ::" #: ../Doc/library/json.rst:82 msgid "Extending :class:`JSONEncoder`::" msgstr "Étendre la classe :class:`JSONEncoder` : ::" #: ../Doc/library/json.rst:102 msgid "Using :mod:`json.tool` from the shell to validate and pretty-print::" msgstr "" "Utiliser :mod:`json.tool` depuis le *shell* pour valider et afficher " "élégamment : ::" #: ../Doc/library/json.rst:115 msgid "" "JSON is a subset of `YAML `_ 1.2. The JSON produced by " "this module's default settings (in particular, the default *separators* " "value) is also a subset of YAML 1.0 and 1.1. This module can thus also be " "used as a YAML serializer." msgstr "" "JSON est un sous-ensemble de `YAML `_ 1.2. Le JSON " "produit par les paramètres par défaut de ce module (en particulier, la " "valeur par défaut de *separators*) est aussi un sous ensemble de YAML 1.0 et " "1.1. Ce module peut alors aussi être utilisé comme sérialiseur YAML." #: ../Doc/library/json.rst:122 msgid "Basic Usage" msgstr "Utilisation basique" #: ../Doc/library/json.rst:129 msgid "" "Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-" "supporting :term:`file-like object`) using this :ref:`conversion table `." msgstr "" "Sérialise *obj* comme un flux JSON formaté vers *fp* (un :term:`file-like " "object` gérant ``.write()``) utilisant cette :ref:`table de conversion `." #: ../Doc/library/json.rst:133 msgid "" "If *skipkeys* is true (default: ``False``), then dict keys that are not of a " "basic type (:class:`str`, :class:`unicode`, :class:`int`, :class:`long`, :" "class:`float`, :class:`bool`, ``None``) will be skipped instead of raising " "a :exc:`TypeError`." msgstr "" #: ../Doc/library/json.rst:138 msgid "" "If *ensure_ascii* is true (the default), all non-ASCII characters in the " "output are escaped with ``\\uXXXX`` sequences, and the result is a :class:" "`str` instance consisting of ASCII characters only. If *ensure_ascii* is " "false, some chunks written to *fp* may be :class:`unicode` instances. This " "usually happens because the input contains unicode strings or the *encoding* " "parameter is used. Unless ``fp.write()`` explicitly understands :class:" "`unicode` (as in :func:`codecs.getwriter`) this is likely to cause an error." msgstr "" #: ../Doc/library/json.rst:147 msgid "" "If *check_circular* is false (default: ``True``), then the circular " "reference check for container types will be skipped and a circular reference " "will result in an :exc:`OverflowError` (or worse)." msgstr "" "Si *check_circular* est faux (vrai par défaut), la vérification des " "références circulaires pour les conteneurs sera ignorée, et une référence " "circulaire résultera en une :exc:`OverflowError` (ou pire)." #: ../Doc/library/json.rst:151 msgid "" "If *allow_nan* is false (default: ``True``), then it will be a :exc:" "`ValueError` to serialize out of range :class:`float` values (``nan``, " "``inf``, ``-inf``) in strict compliance of the JSON specification. If " "*allow_nan* is true, their JavaScript equivalents (``NaN``, ``Infinity``, ``-" "Infinity``) will be used." msgstr "" "Si *allow_nan* est faux (vrai par défaut), une :exc:`ValueError` sera levée " "lors de la sérialisation de valeurs :class:`float` extérieures aux bornes " "(``nan``, ``inf``, ``-inf``), en respect strict de la spécification JSON. Si " "*allow_nan* est vrai, leurs équivalents JavaScript (``NaN``, ``Infinity``, " "``-Infinity``) seront utilisés." #: ../Doc/library/json.rst:157 msgid "" "If *indent* is a non-negative integer, then JSON array elements and object " "members will be pretty-printed with that indent level. An indent level of " "0, or negative, will only insert newlines. ``None`` (the default) selects " "the most compact representation." msgstr "" #: ../Doc/library/json.rst:164 ../Doc/library/json.rst:438 msgid "" "Since the default item separator is ``', '``, the output might include " "trailing whitespace when *indent* is specified. You can use " "``separators=(',', ': ')`` to avoid this." msgstr "" #: ../Doc/library/json.rst:168 ../Doc/library/json.rst:442 msgid "" "If specified, *separators* should be an ``(item_separator, key_separator)`` " "tuple. By default, ``(', ', ': ')`` are used. To get the most compact JSON " "representation, you should specify ``(',', ':')`` to eliminate whitespace." msgstr "" #: ../Doc/library/json.rst:172 msgid "" "*encoding* is the character encoding for str instances, default is UTF-8." msgstr "" #: ../Doc/library/json.rst:174 ../Doc/library/json.rst:446 msgid "" "If specified, *default* should be a function that gets called for objects " "that can't otherwise be serialized. It should return a JSON encodable " "version of the object or raise a :exc:`TypeError`. If not specified, :exc:" "`TypeError` is raised." msgstr "" "Si spécifié, *default* doit être une fonction qui sera appelée pour les " "objets qui ne peuvent être sérialisés autrement. Elle doit renvoyer une " "représentation de l'objet sérialisable en JSON ou lever une :exc:" "`TypeError`. Si non spécifié, une :exc:`TypeError` sera levée pour les " "types non sérialisables." #: ../Doc/library/json.rst:179 msgid "" "If *sort_keys* is true (default: ``False``), then the output of dictionaries " "will be sorted by key." msgstr "" "Si *sort_keys* est vrai (faux par défaut), les dictionnaires seront " "retranscrits triés selon leurs clés." #: ../Doc/library/json.rst:182 msgid "" "To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the :" "meth:`default` method to serialize additional types), specify it with the " "*cls* kwarg; otherwise :class:`JSONEncoder` is used." msgstr "" "Pour utiliser une sous-classe :class:`JSONEncoder` personnalisée (p. ex. une " "qui redéfinit la méthode :meth:`default` pour sérialiser des types " "additionnels), spécifiez-la avec le paramètre nommé *cls* ; autrement, :" "class:`JSONEncoder` est utilisée." #: ../Doc/library/json.rst:188 msgid "" "Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol so " "trying to serialize more objects with repeated calls to :func:`dump` and the " "same *fp* will result in an invalid JSON file." msgstr "" #: ../Doc/library/json.rst:197 msgid "" "Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion " "table `. If *ensure_ascii* is false, the result may " "contain non-ASCII characters and the return value may be a :class:`unicode` " "instance." msgstr "" #: ../Doc/library/json.rst:202 msgid "The arguments have the same meaning as in :func:`dump`." msgstr "" #: ../Doc/library/json.rst:206 msgid "" "Keys in key/value pairs of JSON are always of the type :class:`str`. When a " "dictionary is converted into JSON, all the keys of the dictionary are " "coerced to strings. As a result of this, if a dictionary is converted into " "JSON and then back into a dictionary, the dictionary may not equal the " "original one. That is, ``loads(dumps(x)) != x`` if x has non-string keys." msgstr "" "Les clés dans les couples JSON clé/valeur sont toujours de type :class:" "`str`. Quand un dictionnaire est converti en JSON, toutes les clés du " "dictionnaire sont transformées en chaînes de caractères. Ce qui fait que si " "un dictionnaire est converti en JSON et reconverti en dictionnaire, le " "résultat peut ne pas être égal à l'original. Ainsi, ``loads(dumps(x)) != x`` " "si x contient des clés qui ne sont pas des chaînes." #: ../Doc/library/json.rst:215 msgid "" "Deserialize *fp* (a ``.read()``-supporting :term:`file-like object` " "containing a JSON document) to a Python object using this :ref:`conversion " "table `." msgstr "" "Désérialise *fp* (un :term:`file-like object` supportant ``.read()``, " "contenant un document JSON) vers un objet Python en utilisant cette :ref:" "`table de conversion `." #: ../Doc/library/json.rst:219 msgid "" "If the contents of *fp* are encoded with an ASCII based encoding other than " "UTF-8 (e.g. latin-1), then an appropriate *encoding* name must be specified. " "Encodings that are not ASCII based (such as UCS-2) are not allowed, and " "should be wrapped with ``codecs.getreader(encoding)(fp)``, or simply decoded " "to a :class:`unicode` object and passed to :func:`loads`." msgstr "" #: ../Doc/library/json.rst:225 msgid "" "*object_hook* is an optional function that will be called with the result of " "any object literal decoded (a :class:`dict`). The return value of " "*object_hook* will be used instead of the :class:`dict`. This feature can " "be used to implement custom decoders (e.g. `JSON-RPC `_ class hinting)." msgstr "" "*object_hook* est une fonction optionnelle qui sera appelée avec le résultat " "de chaque objet littéral décodé (chaque :class:`dict`). La valeur de retour " "de *object_hook* sera utilisée à la place du :class:`dict`. Cette " "fonctionnalité peut être utilisée pour implémenter des décodeurs " "personnalisés (p. ex. les *class hinting* de `JSON-RPC `_)." #: ../Doc/library/json.rst:231 msgid "" "*object_pairs_hook* is an optional function that will be called with the " "result of any object literal decoded with an ordered list of pairs. The " "return value of *object_pairs_hook* will be used instead of the :class:" "`dict`. This feature can be used to implement custom decoders that rely on " "the order that the key and value pairs are decoded (for example, :func:" "`collections.OrderedDict` will remember the order of insertion). If " "*object_hook* is also defined, the *object_pairs_hook* takes priority." msgstr "" "*object_pairs_hook* est une fonction optionnelle qui sera appelé pour chaque " "objet littéral décodé, avec une liste ordonnée de couples. La valeur de " "retour de *object_pairs_hook* sera utilisée à la place du :class:`dict`. " "Cette fonctionnalité peut être utilisée pour implémenter des décodeurs " "personnalisés qui s'appuient sur l'ordre dans lequel les couples clé/valeur " "sont décodés (par exemple, :func:`collections.OrderedDict` mémorisera " "l'ordre d'insertion). *object_pairs_hook* prend la priorité sur " "*object_hook*, si cette dernière est aussi définie." #: ../Doc/library/json.rst:239 ../Doc/library/json.rst:333 msgid "Added support for *object_pairs_hook*." msgstr "Ajout du support de *object_pairs_hook*." #: ../Doc/library/json.rst:242 ../Doc/library/json.rst:336 msgid "" "*parse_float*, if specified, will be called with the string of every JSON " "float to be decoded. By default, this is equivalent to ``float(num_str)``. " "This can be used to use another datatype or parser for JSON floats (e.g. :" "class:`decimal.Decimal`)." msgstr "" "*parse_float*, si spécifiée, sera appelée pour chaque nombre réel JSON à " "décoder sous forme d'une chaîne de caractères. Par défaut, elle est " "équivalente à ``float(num_str)``. Cela peut servir à utiliser un autre type " "de données ou un autre analyseur pour les nombres réels JSON (p. ex. :class:" "`decimal.Decimal`)." #: ../Doc/library/json.rst:247 ../Doc/library/json.rst:341 msgid "" "*parse_int*, if specified, will be called with the string of every JSON int " "to be decoded. By default, this is equivalent to ``int(num_str)``. This " "can be used to use another datatype or parser for JSON integers (e.g. :class:" "`float`)." msgstr "" "*parse_int*, si spécifiée, sera appelée pour chaque nombre entier JSON à " "décoder sous forme d'une chaîne de caractères. Par défaut, elle est " "équivalente à ``int(num_str)``. Cela peut servir à utiliser un autre type de " "données ou un autre analyseur pour les nombres entiers JSON (p. ex. :class:" "`float`)." #: ../Doc/library/json.rst:252 msgid "" "*parse_constant*, if specified, will be called with one of the following " "strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to " "raise an exception if invalid JSON numbers are encountered." msgstr "" "*parse_constant*, si spécifiée, sera appelée avec l'une des chaînes de " "caractères suivantes : ``'-Infinity'``, ``'Infinity'`` ou ``'NaN'``. Cela " "peut servir à lever une exception si des nombres JSON invalides sont " "rencontrés." #: ../Doc/library/json.rst:257 msgid "*parse_constant* doesn't get called on 'null', 'true', 'false' anymore." msgstr "*parse_constant* n'est plus appelée pour *null*, *true* ou *false*." #: ../Doc/library/json.rst:260 msgid "" "To use a custom :class:`JSONDecoder` subclass, specify it with the ``cls`` " "kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments " "will be passed to the constructor of the class." msgstr "" "Pour utiliser une sous-classe :class:`JSONDecoder` personnalisée, spécifiez-" "la avec l'argument nommé ``cls`` ; autrement, :class:`JSONDecoder` est " "utilisée. Les arguments nommés additionnels seront passés au constructeur " "de cette classe." #: ../Doc/library/json.rst:267 msgid "" "Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a " "JSON document) to a Python object using this :ref:`conversion table `." msgstr "" #: ../Doc/library/json.rst:271 msgid "" "If *s* is a :class:`str` instance and is encoded with an ASCII based " "encoding other than UTF-8 (e.g. latin-1), then an appropriate *encoding* " "name must be specified. Encodings that are not ASCII based (such as UCS-2) " "are not allowed and should be decoded to :class:`unicode` first." msgstr "" #: ../Doc/library/json.rst:276 msgid "The other arguments have the same meaning as in :func:`load`." msgstr "Les autres arguments ont la même signification que dans :func:`load`." #: ../Doc/library/json.rst:280 msgid "Encoders and Decoders" msgstr "Encodeurs et décodeurs" #: ../Doc/library/json.rst:284 msgid "Simple JSON decoder." msgstr "Décodeur simple JSON." #: ../Doc/library/json.rst:286 msgid "Performs the following translations in decoding by default:" msgstr "Applique par défaut les conversions suivantes en décodant :" #: ../Doc/library/json.rst:291 ../Doc/library/json.rst:383 msgid "JSON" msgstr "JSON" #: ../Doc/library/json.rst:291 ../Doc/library/json.rst:383 msgid "Python" msgstr "Python" #: ../Doc/library/json.rst:293 ../Doc/library/json.rst:385 msgid "object" msgstr "objet" #: ../Doc/library/json.rst:293 ../Doc/library/json.rst:385 msgid "dict" msgstr "*dict*" #: ../Doc/library/json.rst:295 ../Doc/library/json.rst:387 msgid "array" msgstr "*array*" #: ../Doc/library/json.rst:295 msgid "list" msgstr "*list*" #: ../Doc/library/json.rst:297 ../Doc/library/json.rst:389 msgid "string" msgstr "*string*" #: ../Doc/library/json.rst:297 msgid "unicode" msgstr "" #: ../Doc/library/json.rst:299 msgid "number (int)" msgstr "*number* (nombre entier)" #: ../Doc/library/json.rst:299 msgid "int, long" msgstr "" #: ../Doc/library/json.rst:301 msgid "number (real)" msgstr "*number* (nombre réel)" #: ../Doc/library/json.rst:301 msgid "float" msgstr "*float*" #: ../Doc/library/json.rst:303 ../Doc/library/json.rst:393 msgid "true" msgstr "*true*" #: ../Doc/library/json.rst:303 ../Doc/library/json.rst:393 msgid "True" msgstr "*True*" #: ../Doc/library/json.rst:305 ../Doc/library/json.rst:395 msgid "false" msgstr "*false*" #: ../Doc/library/json.rst:305 ../Doc/library/json.rst:395 msgid "False" msgstr "*False*" #: ../Doc/library/json.rst:307 ../Doc/library/json.rst:397 msgid "null" msgstr "*null*" #: ../Doc/library/json.rst:307 ../Doc/library/json.rst:397 msgid "None" msgstr "*None*" #: ../Doc/library/json.rst:310 msgid "" "It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as their " "corresponding ``float`` values, which is outside the JSON spec." msgstr "" "Les valeurs ``NaN``, ``Infinity`` et ``-Infinity`` sont aussi comprises " "comme leurs valeurs ``float`` correspondantes, bien que ne faisant pas " "partie de la spécification JSON." #: ../Doc/library/json.rst:313 msgid "" "*encoding* determines the encoding used to interpret any :class:`str` " "objects decoded by this instance (UTF-8 by default). It has no effect when " "decoding :class:`unicode` objects." msgstr "" #: ../Doc/library/json.rst:317 msgid "" "Note that currently only encodings that are a superset of ASCII work, " "strings of other encodings should be passed in as :class:`unicode`." msgstr "" #: ../Doc/library/json.rst:320 msgid "" "*object_hook*, if specified, will be called with the result of every JSON " "object decoded and its return value will be used in place of the given :" "class:`dict`. This can be used to provide custom deserializations (e.g. to " "support JSON-RPC class hinting)." msgstr "" "*object_hook*, si spécifiée, sera appelée avec le résultat de chaque objet " "JSON décodé et sa valeur de retour sera utilisée à la place du :class:`dict` " "donné. Cela peut être utilisé pour apporter des déserialisations " "personnalisées (p. ex. pour supporter les *class hinting* de JSON-RPC)." #: ../Doc/library/json.rst:325 msgid "" "*object_pairs_hook*, if specified will be called with the result of every " "JSON object decoded with an ordered list of pairs. The return value of " "*object_pairs_hook* will be used instead of the :class:`dict`. This feature " "can be used to implement custom decoders that rely on the order that the key " "and value pairs are decoded (for example, :func:`collections.OrderedDict` " "will remember the order of insertion). If *object_hook* is also defined, the " "*object_pairs_hook* takes priority." msgstr "" "*object_pairs_hook*, si spécifiée, sera appelée avec le résultat de chaque " "objet JSON décodé avec une liste ordonnée de couples. Sa valeur de retour " "sera utilisée à la place du :class:`dict`. Cette fonctionnalité peut être " "utilisée pour implémenter des décodeurs personnalisés se basant sur l'ordre " "dans lequel les couples clé/valeur sont décodés (par exemple, :func:" "`collections.OrderedDict` mémorisera l'ordre d'insertion). " "*object_pairs_hook* prend la priorité sur *object_hook*, si cette dernière " "est aussi définie." #: ../Doc/library/json.rst:346 msgid "" "*parse_constant*, if specified, will be called with one of the following " "strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``, ``'null'``, ``'true'``, " "``'false'``. This can be used to raise an exception if invalid JSON numbers " "are encountered." msgstr "" #: ../Doc/library/json.rst:351 msgid "" "If *strict* is false (``True`` is the default), then control characters will " "be allowed inside strings. Control characters in this context are those " "with character codes in the 0-31 range, including ``'\\t'`` (tab), " "``'\\n'``, ``'\\r'`` and ``'\\0'``." msgstr "" #: ../Doc/library/json.rst:356 msgid "" "If the data being deserialized is not a valid JSON document, a :exc:" "`ValueError` will be raised." msgstr "" #: ../Doc/library/json.rst:361 msgid "" "Return the Python representation of *s* (a :class:`str` or :class:`unicode` " "instance containing a JSON document)." msgstr "" #: ../Doc/library/json.rst:366 msgid "" "Decode a JSON document from *s* (a :class:`str` or :class:`unicode` " "beginning with a JSON document) and return a 2-tuple of the Python " "representation and the index in *s* where the document ended." msgstr "" #: ../Doc/library/json.rst:370 msgid "" "This can be used to decode a JSON document from a string that may have " "extraneous data at the end." msgstr "" "Elle peut être utilisée pour décoder un document JSON depuis une chaîne qui " "peut contenir des données supplémentaires à la fin." #: ../Doc/library/json.rst:376 msgid "Extensible JSON encoder for Python data structures." msgstr "Encodeur JSON extensible pour les structures de données Python." #: ../Doc/library/json.rst:378 msgid "Supports the following objects and types by default:" msgstr "Supporte par défaut les objets et types suivants :" #: ../Doc/library/json.rst:387 msgid "list, tuple" msgstr "*list*, *tuple*" #: ../Doc/library/json.rst:389 msgid "str, unicode" msgstr "" #: ../Doc/library/json.rst:391 msgid "int, long, float" msgstr "" #: ../Doc/library/json.rst:391 msgid "number" msgstr "*number*" #: ../Doc/library/json.rst:400 msgid "" "To extend this to recognize other objects, subclass and implement a :meth:" "`default` method with another method that returns a serializable object for " "``o`` if possible, otherwise it should call the superclass implementation " "(to raise :exc:`TypeError`)." msgstr "" "Pour l'étendre afin de reconnaître d'autres types d'objets, il suffit d'en " "créer une sous-classe et d'implémenter une nouvelle méthode :meth:`default` " "qui renverrait si possible un objet sérialisable pour ``o``, ou ferait appel " "à l'implémentation de la classe mère (qui lèverait une :exc:`TypeError`)." #: ../Doc/library/json.rst:405 msgid "" "If *skipkeys* is false (the default), then it is a :exc:`TypeError` to " "attempt encoding of keys that are not str, int, long, float or ``None``. If " "*skipkeys* is true, such items are simply skipped." msgstr "" #: ../Doc/library/json.rst:409 msgid "" "If *ensure_ascii* is true (the default), all non-ASCII characters in the " "output are escaped with ``\\uXXXX`` sequences, and the results are :class:" "`str` instances consisting of ASCII characters only. If *ensure_ascii* is " "false, a result may be a :class:`unicode` instance. This usually happens if " "the input contains unicode strings or the *encoding* parameter is used." msgstr "" #: ../Doc/library/json.rst:416 msgid "" "If *check_circular* is true (the default), then lists, dicts, and custom " "encoded objects will be checked for circular references during encoding to " "prevent an infinite recursion (which would cause an :exc:`OverflowError`). " "Otherwise, no such check takes place." msgstr "" "Si *check_circular* est vrai (par défaut), une vérification aura lieu sur " "les listes, dictionnaires et objets personnalisés, afin de détecter les " "références circulaires et éviter les récursions infinies (qui causeraient " "une :exc:`OverflowError`). Autrement, la vérification n'a pas lieu." #: ../Doc/library/json.rst:421 msgid "" "If *allow_nan* is true (the default), then ``NaN``, ``Infinity``, and ``-" "Infinity`` will be encoded as such. This behavior is not JSON specification " "compliant, but is consistent with most JavaScript based encoders and " "decoders. Otherwise, it will be a :exc:`ValueError` to encode such floats." msgstr "" "Si *allow_nan* est vrai (par défaut), alors ``NaN``, ``Infinity`` et ``-" "Infinity`` seront encodés comme tels. Ce comportement ne respecte pas la " "spécification JSON, mais est cohérent avec le majorité des encodeurs/" "décodeurs JavaScript. Autrement, une :exc:`ValueError` sera levée pour de " "telles valeurs." #: ../Doc/library/json.rst:427 msgid "" "If *sort_keys* is true (default: ``False``), then the output of dictionaries " "will be sorted by key; this is useful for regression tests to ensure that " "JSON serializations can be compared on a day-to-day basis." msgstr "" "Si *sort_keys* est vrai (``False`` par défaut), alors les dictionnaires " "seront triés par clés en sortie ; cela est utile lors de tests de régression " "pour pouvoir comparer les sérialisations JSON au jour le jour." #: ../Doc/library/json.rst:431 msgid "" "If *indent* is a non-negative integer (it is ``None`` by default), then JSON " "array elements and object members will be pretty-printed with that indent " "level. An indent level of 0 will only insert newlines. ``None`` is the " "most compact representation." msgstr "" #: ../Doc/library/json.rst:451 msgid "" "If *encoding* is not ``None``, then all input strings will be transformed " "into unicode using that encoding prior to JSON-encoding. The default is " "UTF-8." msgstr "" #: ../Doc/library/json.rst:458 msgid "" "Implement this method in a subclass such that it returns a serializable " "object for *o*, or calls the base implementation (to raise a :exc:" "`TypeError`)." msgstr "" "Implémentez cette méthode dans une sous-classe afin qu'elle renvoie un objet " "sérialisable pour *o*, ou appelle l'implémentation de base (qui lèvera une :" "exc:`TypeError`)." #: ../Doc/library/json.rst:462 msgid "" "For example, to support arbitrary iterators, you could implement default " "like this::" msgstr "" "Par exemple, pour supporter des itérateurs arbitraires, vous pourriez " "implémenter *default* comme cela : ::" #: ../Doc/library/json.rst:478 msgid "" "Return a JSON string representation of a Python data structure, *o*. For " "example::" msgstr "" "Renvoie une chaîne JSON représentant la structure de données Python *o*. " "Par exemple : ::" #: ../Doc/library/json.rst:487 msgid "" "Encode the given object, *o*, and yield each string representation as " "available. For example::" msgstr "" "Encode l'objet *o* donné, et produit chaque chaîne représentant l'objet " "selon disponibilité. Par exemple : ::" #: ../Doc/library/json.rst:495 msgid "Standard Compliance and Interoperability" msgstr "Conformité au standard et Interopérabilité" #: ../Doc/library/json.rst:497 msgid "" "The JSON format is specified by :rfc:`7159` and by `ECMA-404 `_. This section " "details this module's level of compliance with the RFC. For simplicity, :" "class:`JSONEncoder` and :class:`JSONDecoder` subclasses, and parameters " "other than those explicitly mentioned, are not considered." msgstr "" "Le format JSON est spécifié par la :rfc:`7159` et le standard `ECMA-404 " "`_. " "Cette section détaille la conformité à la RFC au niveau du module. Pour " "faire simple, les sous-classes de :class:`JSONEncoder` et :class:" "`JSONDecoder`, et les paramètres autres que ceux explicitement mentionnés ne " "sont pas considérés." #: ../Doc/library/json.rst:503 msgid "" "This module does not comply with the RFC in a strict fashion, implementing " "some extensions that are valid JavaScript but not valid JSON. In particular:" msgstr "" "Ce module ne se conforme pas strictement à la RFC, implémentant quelques " "extensions qui sont valides en JavaScript mais pas en JSON. En particulier :" #: ../Doc/library/json.rst:506 msgid "Infinite and NaN number values are accepted and output;" msgstr "Les nombres infinis et *NaN* sont acceptés et retranscrits ;" #: ../Doc/library/json.rst:507 msgid "" "Repeated names within an object are accepted, and only the value of the last " "name-value pair is used." msgstr "" "Les noms répétés au sein d'un objet sont acceptés, seule la valeur du " "dernier couple nom/valeur sera utilisée." #: ../Doc/library/json.rst:510 msgid "" "Since the RFC permits RFC-compliant parsers to accept input texts that are " "not RFC-compliant, this module's deserializer is technically RFC-compliant " "under default settings." msgstr "" "Comme la RFC permet aux analyseurs conformes d'accepter des textes en entrée " "non conformes, le déserialiseur de ce module avec ses paramètres par défaut " "est techniquement conforme à la RFC." #: ../Doc/library/json.rst:515 msgid "Character Encodings" msgstr "Encodage des caractères" #: ../Doc/library/json.rst:517 msgid "" "The RFC requires that JSON be represented using either UTF-8, UTF-16, or " "UTF-32, with UTF-8 being the recommended default for maximum " "interoperability. Accordingly, this module uses UTF-8 as the default for its " "*encoding* parameter." msgstr "" #: ../Doc/library/json.rst:521 msgid "" "This module's deserializer only directly works with ASCII-compatible " "encodings; UTF-16, UTF-32, and other ASCII-incompatible encodings require " "the use of workarounds described in the documentation for the deserializer's " "*encoding* parameter." msgstr "" #: ../Doc/library/json.rst:526 msgid "" "As permitted, though not required, by the RFC, this module's serializer sets " "*ensure_ascii=True* by default, thus escaping the output so that the " "resulting strings only contain ASCII characters." msgstr "" "Comme cela est permis par la RFC, bien que non requis, le sérialiseur du " "module active *ensure_ascii=True* par défaut, échappant ainsi la sortie de " "façon à ce que les chaînes résultants ne contiennent que des caractères " "ASCII." #: ../Doc/library/json.rst:530 msgid "" "The RFC prohibits adding a byte order mark (BOM) to the start of a JSON " "text, and this module's serializer does not add a BOM to its output. The RFC " "permits, but does not require, JSON deserializers to ignore an initial BOM " "in their input. This module's deserializer raises a :exc:`ValueError` when " "an initial BOM is present." msgstr "" "La RFC interdit d'ajouter un *byte* marqueur d'ordre (BOM) au début du texte " "JSON, et le sérialiseur de ce module n'ajoute pas de tel BOM. La RFC permet, " "mais ne requiert pas, que les déserialiseurs JSON ignorent ces BOM. Le " "déserialiseur de ce module lève une :exc:`ValueError` quand un BOM est " "présent au début du fichier." #: ../Doc/library/json.rst:536 msgid "" "The RFC does not explicitly forbid JSON strings which contain byte sequences " "that don't correspond to valid Unicode characters (e.g. unpaired UTF-16 " "surrogates), but it does note that they may cause interoperability problems. " "By default, this module accepts and outputs (when present in the original :" "class:`str`) code points for such sequences." msgstr "" "La RFC n'interdit pas explicitement les chaînes JSON contenant des séquences " "de *bytes* ne correspondant à aucun caractère Unicode valide (p. ex. les " "*surrogates* UTF-16 sans correspondance), mais précise que cela peut causer " "des problèmes d'interopérabilité. Par défaut, ce module accepte et " "retranscrit (quand présents dans la :class:`str` originale) les *code " "points* de telles séquences." #: ../Doc/library/json.rst:544 msgid "Infinite and NaN Number Values" msgstr "Valeurs numériques infinies et NaN" #: ../Doc/library/json.rst:546 msgid "" "The RFC does not permit the representation of infinite or NaN number values. " "Despite that, by default, this module accepts and outputs ``Infinity``, ``-" "Infinity``, and ``NaN`` as if they were valid JSON number literal values::" msgstr "" "La RFC ne permet pas la représentation des nombres infinis ou des *NaN*. " "Néanmoins, par défaut, ce module accepte et retranscrit ``Infinity``, ``-" "Infinity`` et ``NaN`` comme s'ils étaient des valeurs numériques littérales " "JSON valides ::" #: ../Doc/library/json.rst:561 msgid "" "In the serializer, the *allow_nan* parameter can be used to alter this " "behavior. In the deserializer, the *parse_constant* parameter can be used " "to alter this behavior." msgstr "" "Dans le sérialiseur, le paramètre *allow_nan* peut être utilisé pour altérer " "ce comportement. Dans le déserialiseur, le paramètre *parse_constant* peut " "être utilisé pour altérer ce comportement." #: ../Doc/library/json.rst:567 msgid "Repeated Names Within an Object" msgstr "Noms répétés au sein d'un objet" #: ../Doc/library/json.rst:569 msgid "" "The RFC specifies that the names within a JSON object should be unique, but " "does not mandate how repeated names in JSON objects should be handled. By " "default, this module does not raise an exception; instead, it ignores all " "but the last name-value pair for a given name::" msgstr "" "La RFC spécifie que les noms au sein d'un objet JSON doivent être uniques, " "mais ne décrit pas comment les noms répétés doivent être gérés. Par défaut, " "ce module ne lève pas d'exception ; à la place, il ignore tous les couples " "nom/valeur sauf le dernier pour un nom donné : ::" #: ../Doc/library/json.rst:578 msgid "The *object_pairs_hook* parameter can be used to alter this behavior." msgstr "" "Le paramètre *object_pairs_hook* peut être utilisé pour altérer ce " "comportement." #: ../Doc/library/json.rst:582 msgid "Top-level Non-Object, Non-Array Values" msgstr "Valeurs de plus haut niveau autres qu'objets ou tableaux" #: ../Doc/library/json.rst:584 msgid "" "The old version of JSON specified by the obsolete :rfc:`4627` required that " "the top-level value of a JSON text must be either a JSON object or array " "(Python :class:`dict` or :class:`list`), and could not be a JSON null, " "boolean, number, or string value. :rfc:`7159` removed that restriction, and " "this module does not and has never implemented that restriction in either " "its serializer or its deserializer." msgstr "" "L'ancienne version de JSON spécifiée par l'obsolète :rfc:`4627` demandait à " "ce que la valeur de plus haut niveau du texte JSON soit un objet ou un " "tableau JSON (:class:`dict` ou :class:`list` Python), et ne soit pas *null*, " "un nombre, ou une chaîne de caractères. La :rfc:`7159` a supprimé cette " "restriction, jamais implémentée par ce module, que ce soit dans le " "sérialiseur ou le déserialiseur." #: ../Doc/library/json.rst:591 msgid "" "Regardless, for maximum interoperability, you may wish to voluntarily adhere " "to the restriction yourself." msgstr "" "Cependant, pour une interopérabilité maximale, vous pourriez volontairement " "souhaiter adhérer à cette restriction par vous-même." #: ../Doc/library/json.rst:596 msgid "Implementation Limitations" msgstr "Limitations de l'implémentation" #: ../Doc/library/json.rst:598 msgid "Some JSON deserializer implementations may set limits on:" msgstr "" "Certaines implémentations de déserialiseurs JSON peuvent avoir des limites " "sur :" #: ../Doc/library/json.rst:600 msgid "the size of accepted JSON texts" msgstr "la taille des textes JSON acceptés ;" #: ../Doc/library/json.rst:601 msgid "the maximum level of nesting of JSON objects and arrays" msgstr "le niveau maximum d'objets et tableaux JSON imbriqués ;" #: ../Doc/library/json.rst:602 msgid "the range and precision of JSON numbers" msgstr "l'intervalle et la précision des nombres JSON ;" #: ../Doc/library/json.rst:603 msgid "the content and maximum length of JSON strings" msgstr "le contenu et la longueur maximale des chaînes JSON." #: ../Doc/library/json.rst:605 msgid "" "This module does not impose any such limits beyond those of the relevant " "Python datatypes themselves or the Python interpreter itself." msgstr "" "Ce module n'impose pas de telles limites si ce n'est celles inhérentes aux " "types de données Python ou à l'interpréteur." #: ../Doc/library/json.rst:608 msgid "" "When serializing to JSON, beware any such limitations in applications that " "may consume your JSON. In particular, it is common for JSON numbers to be " "deserialized into IEEE 754 double precision numbers and thus subject to that " "representation's range and precision limitations. This is especially " "relevant when serializing Python :class:`int` values of extremely large " "magnitude, or when serializing instances of \"exotic\" numerical types such " "as :class:`decimal.Decimal`." msgstr "" "Lors d'une sérialisation JSON, faites attention à ces limitations dans les " "applications qui utiliseraient votre JSON. En particulier, il est commun " "pour les nombres JSON d'être déserialisés vers des nombres IEEE 754 à " "précision double, et donc sujets à l'intervalle et aux limitations sur la " "précision de cette représentation. Cela est d'autant plus important lors de " "la sérialisation de valeurs :class:`int` Python de forte magnitude, ou " "d'instances de types numériques « exotiques » comme :class:`decimal.Decimal`." #: ../Doc/library/json.rst:618 msgid "Footnotes" msgstr "Notes" #: ../Doc/library/json.rst:619 msgid "" "As noted in `the errata for RFC 7159 `_, JSON permits literal U+2028 (LINE SEPARATOR) " "and U+2029 (PARAGRAPH SEPARATOR) characters in strings, whereas JavaScript " "(as of ECMAScript Edition 5.1) does not." msgstr "" "Comme noté dans `l'errata de la RFC 7159 `_, JSON autorise les caractères littéraux U+2028 " "(*LINE SEPARATOR*) et U+2029 (*PARAGRAPH SEPARATOR*) dans les chaînes de " "caractères, alors que Javascript (selon le standard ECMAScript édition 5.1) " "ne le permet pas."