001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.serializer.annotation; 018 019import static java.lang.annotation.ElementType.*; 020import static java.lang.annotation.RetentionPolicy.*; 021 022import java.lang.annotation.*; 023import java.nio.charset.*; 024 025import org.apache.juneau.*; 026import org.apache.juneau.annotation.*; 027import org.apache.juneau.parser.*; 028import org.apache.juneau.serializer.*; 029 030/** 031 * Annotation for specifying config properties defined in {@link Serializer}, {@link OutputStreamSerializer}, and {@link WriterSerializer}. 032 * 033 * <p> 034 * Used primarily for specifying bean configuration properties on REST classes and methods. 035 * 036 * <h5 class='section'>See Also:</h5><ul> 037 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/SerializersAndParsers">Serializers and Parsers</a> 038 * </ul> 039 */ 040@Target({ TYPE, METHOD }) 041@Retention(RUNTIME) 042@Inherited 043@ContextApply({ SerializerConfigAnnotation.SerializerApply.class, SerializerConfigAnnotation.OutputStreamSerializerApply.class, SerializerConfigAnnotation.WriterSerializerApply.class }) 044public @interface SerializerConfig { 045 046 /** 047 * Add <js>"_type"</js> properties when needed. 048 * 049 * <p> 050 * If <js>"true"</js>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred 051 * through reflection. 052 * 053 * <p> 054 * This is used to recreate the correct objects during parsing if the object types cannot be inferred. 055 * <br>For example, when serializing a <c>Map<String,Object></c> field where the bean class cannot be determined from 056 * the type of the values. 057 * 058 * <p> 059 * Note the differences between the following settings: 060 * <ul> 061 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addRootType()} - Affects whether <js>'_type'</js> is added to root node. 062 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addBeanTypes()} - Affects whether <js>'_type'</js> is added to any nodes. 063 * </ul> 064 * 065 * <ul class='values'> 066 * <li><js>"true"</js> 067 * <li><js>"false"</js> (default) 068 * </ul> 069 * 070 * <h5 class='section'>Notes:</h5><ul> 071 * <li class='note'> 072 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 073 * </ul> 074 * 075 * <h5 class='section'>See Also:</h5><ul> 076 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addBeanTypes()} 077 * </ul> 078 * 079 * @return The annotation value. 080 */ 081 String addBeanTypes() default ""; 082 083 /** 084 * Add type attribute to root nodes. 085 * 086 * <p> 087 * When disabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level 088 * type information that might normally be included to determine the data type will not be serialized. 089 * 090 * <p> 091 * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Bean(typeName)} value, a 092 * <js>'_type'</js> attribute will only be added when this setting is enabled. 093 * 094 * <p> 095 * Note the differences between the following settings: 096 * <ul> 097 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addRootType()} - Affects whether <js>'_type'</js> is added to root node. 098 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addBeanTypes()} - Affects whether <js>'_type'</js> is added to any nodes. 099 * </ul> 100 * 101 * <ul class='values'> 102 * <li><js>"true"</js> 103 * <li><js>"false"</js> (default) 104 * </ul> 105 * 106 * <h5 class='section'>Notes:</h5><ul> 107 * <li class='note'> 108 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 109 * </ul> 110 * 111 * <h5 class='section'>See Also:</h5><ul> 112 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#addRootType()} 113 * </ul> 114 * 115 * @return The annotation value. 116 */ 117 String addRootType() default ""; 118 119 /** 120 * Binary output format. 121 * 122 * <p> 123 * When using the {@link OutputStreamSerializer#serializeToString(Object)} method on stream-based serializers, this defines the format to use 124 * when converting the resulting byte array to a string. 125 * 126 * <ul class='values'> 127 * <li><js>"SPACED_HEX"</js> 128 * <li><js>"HEX"</js> (default) 129 * <li><js>"BASE64"</js> 130 * </ul> 131 * 132 * <h5 class='section'>Notes:</h5><ul> 133 * <li class='note'> 134 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 135 * </ul> 136 * 137 * <h5 class='section'>See Also:</h5><ul> 138 * <li class='jm'>{@link org.apache.juneau.serializer.OutputStreamSerializer.Builder#binaryFormat(BinaryFormat)} 139 * </ul> 140 * 141 * @return The annotation value. 142 */ 143 String binaryFormat() default ""; 144 145 /** 146 * Automatically detect POJO recursions. 147 * 148 * <p> 149 * Specifies that recursions should be checked for during traversal. 150 * 151 * <p> 152 * Recursions can occur when traversing models that aren't true trees but rather contain loops. 153 * <br>In general, unchecked recursions cause stack-overflow-errors. 154 * <br>These show up as {@link ParseException ParseExceptions} with the message <js>"Depth too deep. Stack overflow occurred."</js>. 155 * 156 * <p> 157 * The behavior when recursions are detected depends on the value for {@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()}. 158 * 159 * <p> 160 * For example, if a model contains the links A->B->C->A, then the JSON generated will look like 161 * the following when <jsf>BEANTRAVERSE_ignoreRecursions</jsf> is <jk>true</jk>... 162 * 163 * <p class='bjson'> 164 * {A:{B:{C:<jk>null</jk>}}} 165 * </p> 166 * 167 * <ul class='values'> 168 * <li><js>"true"</js> 169 * <li><js>"false"</js> (default) 170 * </ul> 171 * 172 * <h5 class='section'>Notes:</h5><ul> 173 * <li class='warn'> 174 * Checking for recursion can cause a small performance penalty. 175 * <li class='note'> 176 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 177 * </ul> 178 * 179 * <h5 class='section'>See Also:</h5><ul> 180 * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()} 181 * </ul> 182 * 183 * @return The annotation value. 184 */ 185 String detectRecursions() default ""; 186 187 /** 188 * File charset. 189 * 190 * <p> 191 * The character set to use for writing Files to the file system. 192 * 193 * <p> 194 * Used when passing in files to {@link Serializer#serialize(Object, Object)}. 195 * 196 * <h5 class='section'>Notes:</h5><ul> 197 * <li class='note'> 198 * Format: string 199 * <li class='note'> 200 * "DEFAULT" can be used to indicate the JVM default file system charset. 201 * <li class='note'> 202 * Default: JVM system default. 203 * <li class='note'> 204 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 205 * <li class='note'> 206 * This setting does not apply to the RDF serializers. 207 * </ul> 208 * 209 * <h5 class='section'>See Also:</h5><ul> 210 * <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#fileCharset(java.nio.charset.Charset)} 211 * </ul> 212 * 213 * @return The annotation value. 214 */ 215 String fileCharset() default ""; 216 217 /** 218 * Ignore recursion errors. 219 * 220 * <p> 221 * Used in conjunction with {@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}. 222 * <br>Setting is ignored if <jsf>BEANTRAVERSE_detectRecursions</jsf> is <js>"false"</js>. 223 * 224 * <p> 225 * If <js>"true"</js>, when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>. 226 * <br>Otherwise, a {@link BeanRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>. 227 * 228 * <ul class='values'> 229 * <li><js>"true"</js> 230 * <li><js>"false"</js> (default) 231 * </ul> 232 * 233 * <h5 class='section'>Notes:</h5><ul> 234 * <li class='note'> 235 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 236 * </ul> 237 * 238 * <h5 class='section'>See Also:</h5><ul> 239 * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()} 240 * </ul> 241 * 242 * @return The annotation value. 243 */ 244 String ignoreRecursions() default ""; 245 246 /** 247 * Initial depth. 248 * 249 * <p> 250 * The initial indentation level at the root. 251 * <br>Useful when constructing document fragments that need to be indented at a certain level. 252 * 253 * <h5 class='section'>Notes:</h5><ul> 254 * <li class='note'> 255 * Format: integer 256 * <li class='note'> 257 * Default value: <js>"0"</js> 258 * <li class='note'> 259 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 260 * </ul> 261 * 262 * <h5 class='section'>See Also:</h5><ul> 263 * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#initialDepth(int)} 264 * </ul> 265 * 266 * @return The annotation value. 267 */ 268 String initialDepth() default ""; 269 270 /** 271 * Don't trim null bean property values. 272 * 273 * <p> 274 * If <js>"true"</js>, null bean values will be serialized to the output. 275 * 276 * <p> 277 * Note that not enabling this setting has the following effects on parsing: 278 * <ul class='spaced-list'> 279 * <li> 280 * Map entries with <jk>null</jk> values will be lost. 281 * </ul> 282 * 283 * <ul class='values'> 284 * <li><js>"true"</js> 285 * <li><js>"false"</js> (default) 286 * </ul> 287 * 288 * <h5 class='section'>Notes:</h5><ul> 289 * <li class='note'> 290 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 291 * </ul> 292 * 293 * <h5 class='section'>See Also:</h5><ul> 294 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#keepNullProperties()} 295 * </ul> 296 * 297 * @return The annotation value. 298 */ 299 String keepNullProperties() default ""; 300 301 /** 302 * Serializer listener. 303 * 304 * <p> 305 * Class used to listen for errors and warnings that occur during serialization. 306 * 307 * <h5 class='section'>See Also:</h5><ul> 308 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#listener(Class)} 309 * </ul> 310 * 311 * @return The annotation value. 312 */ 313 Class<? extends SerializerListener> listener() default SerializerListener.Void.class; 314 315 /** 316 * Max traversal depth. 317 * 318 * <p> 319 * Abort traversal if specified depth is reached in the POJO tree. 320 * <br>If this depth is exceeded, an exception is thrown. 321 * 322 * <h5 class='section'>Notes:</h5><ul> 323 * <li class='note'> 324 * Format: integer 325 * <li class='note'> 326 * Default value: <js>"100"</js> 327 * <li class='note'> 328 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 329 * </ul> 330 * 331 * <h5 class='section'>See Also:</h5><ul> 332 * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#maxDepth(int)} 333 * </ul> 334 * 335 * @return The annotation value. 336 */ 337 String maxDepth() default ""; 338 339 /** 340 * Maximum indentation. 341 * 342 * <p> 343 * Specifies the maximum indentation level in the serialized document. 344 * 345 * <h5 class='section'>Notes:</h5><ul> 346 * <li class='note'> 347 * Format: integer 348 * <li class='note'> 349 * Default: 100 350 * <li class='note'> 351 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 352 * <li class='note'> 353 * This setting does not apply to the RDF serializers. 354 * </ul> 355 * 356 * <h5 class='section'>See Also:</h5><ul> 357 * <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#maxIndent(int)} 358 * </ul> 359 * 360 * @return The annotation value. 361 */ 362 String maxIndent() default ""; 363 364 /** 365 * Quote character. 366 * 367 * <p> 368 * This is the character used for quoting attributes and values. 369 * 370 * <h5 class='section'>Notes:</h5><ul> 371 * <li class='note'> 372 * Default: <c>"</c> 373 * <li class='note'> 374 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 375 * <li class='note'> 376 * This setting does not apply to the RDF serializers. 377 * </ul> 378 * 379 * <h5 class='section'>See Also:</h5><ul> 380 * <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#quoteChar(char)} 381 * </ul> 382 * 383 * @return The annotation value. 384 */ 385 String quoteChar() default ""; 386 387 /** 388 * Optional rank for this config. 389 * 390 * <p> 391 * Can be used to override default ordering and application of config annotations. 392 * 393 * @return The annotation value. 394 */ 395 int rank() default 0; 396 397 /** 398 * Sort arrays and collections alphabetically. 399 * 400 * <p> 401 * Copies and sorts the contents of arrays and collections before serializing them. 402 * 403 * <p> 404 * Note that this introduces a performance penalty. 405 * 406 * <ul class='values'> 407 * <li><js>"true"</js> 408 * <li><js>"false"</js> (default) 409 * </ul> 410 * 411 * <h5 class='section'>Notes:</h5><ul> 412 * <li class='note'> 413 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 414 * </ul> 415 * 416 * <h5 class='section'>See Also:</h5><ul> 417 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#sortCollections()} 418 * </ul> 419 * 420 * @return The annotation value. 421 */ 422 String sortCollections() default ""; 423 424 /** 425 * Sort maps alphabetically. 426 * 427 * <p> 428 * Copies and sorts the contents of maps by their keys before serializing them. 429 * 430 * <p> 431 * Note that this introduces a performance penalty. 432 * 433 * <ul class='values'> 434 * <li><js>"true"</js> 435 * <li><js>"false"</js> (default) 436 * </ul> 437 * 438 * <h5 class='section'>Notes:</h5><ul> 439 * <li class='note'> 440 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 441 * </ul> 442 * 443 * <h5 class='section'>See Also:</h5><ul> 444 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#sortMaps()} 445 * </ul> 446 * 447 * @return The annotation value. 448 */ 449 String sortMaps() default ""; 450 451 /** 452 * Output stream charset. 453 * 454 * <p> 455 * The character set to use when writing to OutputStreams. 456 * 457 * <p> 458 * Used when passing in output streams and byte arrays to {@link WriterSerializer#serialize(Object, Object)}. 459 * 460 * <h5 class='section'>Notes:</h5><ul> 461 * <li class='note'> 462 * Format: string 463 * <li class='note'> 464 * Default: <js>"utf-8"</js>. 465 * <li class='note'> 466 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 467 * <li class='note'> 468 * This setting does not apply to the RDF serializers. 469 * </ul> 470 * 471 * <h5 class='section'>See Also:</h5><ul> 472 * <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#streamCharset(Charset)} 473 * </ul> 474 * 475 * @return The annotation value. 476 */ 477 String streamCharset() default ""; 478 479 /** 480 * Trim empty lists and arrays. 481 * 482 * <p> 483 * If <js>"true"</js>, empty lists and arrays will not be serialized. 484 * 485 * <p> 486 * Note that enabling this setting has the following effects on parsing: 487 * <ul class='spaced-list'> 488 * <li> 489 * Map entries with empty list values will be lost. 490 * <li> 491 * Bean properties with empty list values will not be set. 492 * </ul> 493 * 494 * <ul class='values'> 495 * <li><js>"true"</js> 496 * <li><js>"false"</js> (default) 497 * </ul> 498 * 499 * <h5 class='section'>Notes:</h5><ul> 500 * <li class='note'> 501 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 502 * </ul> 503 * 504 * <h5 class='section'>See Also:</h5><ul> 505 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#trimEmptyCollections()} 506 * </ul> 507 * 508 * @return The annotation value. 509 */ 510 String trimEmptyCollections() default ""; 511 512 /** 513 * Trim empty maps. 514 * 515 * <p> 516 * If <js>"true"</js>, empty map values will not be serialized to the output. 517 * 518 * <p> 519 * Note that enabling this setting has the following effects on parsing: 520 * <ul class='spaced-list'> 521 * <li> 522 * Bean properties with empty map values will not be set. 523 * </ul> 524 * 525 * <ul class='values'> 526 * <li><js>"true"</js> 527 * <li><js>"false"</js> (default) 528 * </ul> 529 * 530 * <h5 class='section'>Notes:</h5><ul> 531 * <li class='note'> 532 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 533 * </ul> 534 * 535 * <h5 class='section'>See Also:</h5><ul> 536 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#trimEmptyMaps()} 537 * </ul> 538 * 539 * @return The annotation value. 540 */ 541 String trimEmptyMaps() default ""; 542 543 /** 544 * Trim strings. 545 * 546 * <p> 547 * If <js>"true"</js>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized. 548 * 549 * <ul class='values'> 550 * <li><js>"true"</js> 551 * <li><js>"false"</js> (default) 552 * </ul> 553 * 554 * <h5 class='section'>Notes:</h5><ul> 555 * <li class='note'> 556 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 557 * </ul> 558 * 559 * <h5 class='section'>See Also:</h5><ul> 560 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#trimStrings()} 561 * </ul> 562 * 563 * @return The annotation value. 564 */ 565 String trimStrings() default ""; 566 567 /** 568 * URI context bean. 569 * 570 * <h5 class='section'>Description:</h5> 571 * <p> 572 * Bean used for resolution of URIs to absolute or root-relative form. 573 * 574 * <h5 class='section'>Notes:</h5><ul> 575 * <li class='note'> 576 * Format: JSON object representing a {@link UriContext} 577 * <li class='note'> 578 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 579 * </ul> 580 * 581 * <h5 class='section'>See Also:</h5><ul> 582 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#uriContext(UriContext)} 583 * </ul> 584 * 585 * @return The annotation value. 586 */ 587 String uriContext() default ""; 588 589 /** 590 * URI relativity. 591 * 592 * <p> 593 * Defines what relative URIs are relative to when serializing any of the following: 594 * <ul> 595 * <li>{@link java.net.URI} 596 * <li>{@link java.net.URL} 597 * <li>Properties and classes annotated with {@link Uri @Uri} 598 * </ul> 599 * 600 * <ul class='values'> 601 * <li><js>"RESOURCE"</js> (default) - Relative URIs should be considered relative to the servlet URI. 602 * <li><js>"PATH_INFO"</js> - Relative URIs should be considered relative to the request URI. 603 * </ul> 604 * 605 * <h5 class='section'>Notes:</h5><ul> 606 * <li class='note'> 607 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 608 * </ul> 609 * 610 * <h5 class='section'>See Also:</h5><ul> 611 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#uriRelativity(UriRelativity)} 612 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshallingUris">URIs</a> 613 * </ul> 614 * 615 * @return The annotation value. 616 */ 617 String uriRelativity() default ""; 618 619 /** 620 * URI resolution. 621 * 622 * <p> 623 * Defines the resolution level for URIs when serializing any of the following: 624 * <ul> 625 * <li>{@link java.net.URI} 626 * <li>{@link java.net.URL} 627 * <li>Properties and classes annotated with {@link Uri @Uri} 628 * </ul> 629 * 630 * <ul class='values'> 631 * <li><js>"ABSOLUTE"</js> - Resolve to an absolute URL (e.g. <js>"http://host:port/context-root/servlet-path/path-info"</js>). 632 * <li><js>"ROOT_RELATIVE"</js> - Resolve to a root-relative URL (e.g. <js>"/context-root/servlet-path/path-info"</js>). 633 * <li><js>"NONE"</js> (default) - Don't do any URL resolution. 634 * </ul> 635 * 636 * <h5 class='section'>Notes:</h5><ul> 637 * <li class='note'> 638 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 639 * </ul> 640 * 641 * <h5 class='section'>See Also:</h5><ul> 642 * <li class='jm'>{@link org.apache.juneau.serializer.Serializer.Builder#uriResolution(UriResolution)} 643 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshallingUris">URIs</a> 644 * </ul> 645 * 646 * @return The annotation value. 647 */ 648 String uriResolution() default ""; 649 650 /** 651 * Use whitespace. 652 * 653 * <p> 654 * If <js>"true"</js>, whitespace is added to the output to improve readability. 655 * 656 * <ul class='values'> 657 * <li><js>"true"</js> 658 * <li><js>"false"</js> (default) 659 * </ul> 660 * 661 * <h5 class='section'>Notes:</h5><ul> 662 * <li class='note'> 663 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 664 * </ul> 665 * 666 * <h5 class='section'>See Also:</h5><ul> 667 * <li class='jm'>{@link org.apache.juneau.serializer.WriterSerializer.Builder#useWhitespace()} 668 * </ul> 669 * 670 * @return The annotation value. 671 */ 672 String useWhitespace() default ""; 673}