站点介绍

Inherited project, configs in properties; new teammate, commits in yml. One service, two dialects, key names eyeballed side by side - miss one and the pager goes off at 2 a.m. After an hour of pasting two config files back and forth that day, what I wanted was a converter that could prove nothing got lost. This page was built to that spec: both directions, a round-trip check, all in the browser.
Yes. A # comment in YAML moves into Properties attached to the nearest key below it; Properties comments ride back into YAML the same way. The one exception is comments at the very top before any key appears - those land at the head of the output.
YAML side: mappings, sequences, indentation nesting, flow style ([a, b], {k: v}), single- and double-quoted strings, numbers, booleans, null (~ or empty), comments, block scalars | and >. Properties side: both = and : separators, backslash continuations, \u4e2d Unicode escapes, # and ! comments.
Fair warning: anchors &, multi-document --- and tags !! are not supported - they raise an error with a line number instead of silently dropping content.
Two styles to pick from: comma-separated (items=a,b,c) or indexed (items.0=a, items.1=b, items.2=c). Spring Boot accepts both officially; the indexed style keeps per-element comment positions while the comma style saves lines. Switch in the options before converting.
No, types are inferred automatically: 8080 comes out as a number, true/false as booleans, empty values as null; only quoted values stay strings. To force a value to remain a string, wrap it in quotes in the Properties file.
The key-value set matches exactly: every key and every value (numbers, booleans, null, arrays included) corresponds one to one after the round trip, and the page has a round-trip check button to verify on the spot. Ordering and layout may differ (Properties sorts keys more stably), and block-scalar multi-line text becomes an escaped single line and back.
No. Parsing and conversion run entirely in this device's browser - there is no upload endpoint and the page works offline. Only interface options like array style and indent width live in this browser's localStorage; they do not follow you to another device, and Clear my data in the footer removes them. And do not paste production secrets into any online tool.
中文版:https://www.9314.cn/tools/yaml-properties/
评论列表 (0条)