Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 114 for converterTo (0.18 sec)

  1. docs/pt/docs/tutorial/encoder.md

    {!> ../../docs_src/encoder/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="5  22"
    {!> ../../docs_src/encoder/tutorial001.py!}
    ```
    
    ////
    
    Neste exemplo, ele converteria o modelo Pydantic em um `dict`, e o `datetime` em um `str`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. docs/pt/docs/advanced/response-directly.md

    ## Retornando uma `Response`
    
    O exemplo acima mostra todas as partes que você precisa, mas ainda não é muito útil, já que você poderia ter retornado o `item` diretamente, e o **FastAPI** colocaria em uma `JSONResponse` para você, convertendo em um `dict`, etc. Tudo isso por padrão.
    
    Agora, vamos ver como você pode usar isso para retornar uma resposta personalizada.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/body-updates.md

    Você pode usar `jsonable_encoder` para converter os dados de entrada em dados que podem ser armazenados como JSON (por exemplo, com um banco de dados NoSQL). Por exemplo, convertendo `datetime` em `str`.
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="28-33"
    {!> ../../../docs_src/body_updates/tutorial001_py310.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 14 09:16:06 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/smb1/NetShareEnumResponse.java

        public String toString() {
            return new String( "NetShareEnumResponse[" +
                    super.toString() +
                    ",status=" + status +
                    ",converter=" + converter +
                    ",entriesReturned=" + numEntries +
                    ",totalAvailableEntries=" + totalAvailableEntries + "]" );
        }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 3K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/beans/converter/NumberConverterTest.java

            final NumberConverter converter = new NumberConverter("##0");
            assertThat(converter.getAsObject("100"), is((Object) Long.valueOf("100")));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testGetAsString() throws Exception {
            final NumberConverter converter = new NumberConverter("##0");
            assertThat(converter.getAsString(new Integer("100")), is("100"));
        }
    
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/core/beans/converter/SqlDateConverterTest.java

         */
        @Test
        public void testGetAsObjectAndGetAsString() throws Exception {
            final SqlDateConverter converter = new SqlDateConverter("yyyy/MM/dd");
            final java.sql.Date result = (java.sql.Date) converter.getAsObject("2008/01/16");
            System.out.println(result);
            assertThat(converter.getAsString(result), is("2008/01/16"));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/beans/converter/DateConverterTest.java

         */
        @Test
        public void testGetAsObjectAndGetAsString() throws Exception {
            final DateConverter converter = new DateConverter("yyyy/MM/dd");
            final Date result = (Date) converter.getAsObject("2008/01/16");
            System.out.println(result);
            assertThat(converter.getAsString(result), is("2008/01/16"));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/core/beans/converter/TimeConverterTest.java

         */
        @Test
        public void testGetAsObjectAndGetAsString() throws Exception {
            final TimeConverter converter = new TimeConverter("HH:mm:ss");
            final java.sql.Time result = (java.sql.Time) converter.getAsObject("12:34:56");
            System.out.println(result);
            assertThat(converter.getAsString(result), is("12:34:56"));
        }
    
        /**
         * @throws Exception
         */
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb1/net/NetServerEnum2Response.java

        }
    
    
        @Override
        public String toString () {
            return new String(
                "NetServerEnum2Response[" + super.toString() + ",status=" + this.getStatus() + ",converter=" + this.converter + ",entriesReturned="
                        + this.getNumEntries() + ",totalAvailableEntries=" + this.totalAvailableEntries + ",lastName=" + this.lastName + "]");
        }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 5.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/base/EnumsTest.java

      public void testStringConverter_convert() {
        Converter<String, TestEnum> converter = Enums.stringConverter(TestEnum.class);
        assertEquals(TestEnum.CHEETO, converter.convert("CHEETO"));
        assertEquals(TestEnum.HONDA, converter.convert("HONDA"));
        assertEquals(TestEnum.POODLE, converter.convert("POODLE"));
        assertNull(converter.convert(null));
        assertNull(converter.reverse().convert(null));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top