en	= Conversion Customization Guidelines With so many options, it can be hard to choose the best way to customise conversion for your type. In this section, we will discuss those options and suggest which to choose when.
zh-hans	= 转换自定义指南 由于选项众多，为类型选择最合适的转换自定义方式可能并不容易。本节将讨论这些选项，并给出不同场景下的选用建议。

en	The first advice is to use one of the library-provided conversions, rather then providing a custom one, unless the resulting format is undesirable. If the library deduces the wrong conversion category, you can opt out by specialising the relevant trait to inherit from `std::false_type`.
zh-hans	首要建议是：除非生成的格式不符合需求，否则应优先使用库提供的转换，而非自行实现自定义转换。如果库错误地推断了转换类别，你可以通过将相关特征特化为继承自 `std::false_type` 来排除该转换。

en	If library-provided conversions are suitable for you, you have the option to use direct conversions. This also puts the requirement of being default constructible on many of your types.
zh-hans	如果库提供的转换对你适用，你可以选择使用直接转换。但这同时也要求你的许多类型必须是可默认构造的。

en	The next thing to consider is whether your conversions are intended for internal use, or whether your users are not members of your team. If your users are external, then they will ultimately determine the conditions in which these conversions will be used. Conversely, for internal libraries and applications, you have the full control of usage conditions.
zh-hans	接下来需要考虑的是：您的转换是仅供内部使用，还是面向团队以外的用户。如果您的用户属于外部人员，那么他们最终将决定这些转换的使用条件；反之，对于内部库和应用程序，您可以完全掌控其使用条件。

en	If your users are external, they and not you decide whether throwing exceptions is acceptable. So, in this case it is better to use non-throwing `tag_invoke` overloads. In addition, for customising conversion of composite types, always use `tag_invoke` overload with 2 context parameters. This will allow correct context propagation to elements of composites. This will also allow propagation of exceptions from conversion of elements.
zh-hans	如果您的用户是外部的，那么是否允许抛出异常是由他们而非您来决定的。因此，在这种情况下，最好使用不抛异常的 `tag_invoke` 重载。此外，在自定义复合类型的转换时，应始终使用带有两个上下文参数的 `tag_invoke` 重载。这将确保上下文能正确传递给复合类型的各个元素，同时也支持从元素转换中传播异常。

en	Finally, it is worth mentioning that due to the ability to provide conversions to JSON containers without a binary dependency on the library, you don't have to push such dependency on your users. This is particularly relevant for libraries for which interoperation with Boost.JSON is only ancillary.
zh-hans	最后值得一提的是，由于可以在不引入对库的二进制依赖的前提下提供到 JSON 容器的转换，因此您无需将此类依赖强加给您的用户。这一点对于那些仅需与 Boost.JSON 进行辅助性互操作的库尤为重要。