<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>jabaraster</author_name>
  <author_url>https://blog.hatena.ne.jp/jabaraster/</author_url>
  <blog_title>じゃばらの手記</blog_title>
  <blog_url>https://jabaraster.hatenadiary.org/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>JAX-RSは素晴らしい仕様です。しかし、その参照実装であるJerseyでJSONを扱うときには注意が必要です。 けっこうイヤな動きをします。 Listオブジェクトをエンコードしてくれない トップレベルのオブジェクトがListの場合、JSONにしてくれません。 他のオブジェクトのプロパティとしてListを持たせる分にはOKです。 Listの要素数でJSONでの型が変わる 要素数が0のとき⇒null 要素数が1のとき⇒要素そのもの 要素数が2以上のとき⇒配列 となります。・・・この仕様が嬉しい人いたら教えて下さい。 サンプル 文字列のListをJSONで返すコードを書いてみます。直感的な動作は …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjabaraster.hatenadiary.org%2Fentry%2F20121010%2F1349878927&quot; title=&quot;JerseyでJSONを扱うときは注意 - じゃばらの手記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-10-10 23:22:07</published>
  <title>JerseyでJSONを扱うときは注意</title>
  <type>rich</type>
  <url>https://jabaraster.hatenadiary.org/entry/20121010/1349878927</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
