LogoLogo
  • Internet Object 1.0
  • Internet Object
    • Abstract
    • The Poetic Principles of Internet Object
    • Objectives
    • Introducing Internet Object
  • The Structure
    • Internet Object Document
      • Header
      • Data Sections
    • Structural Elements
      • Structural Characters and Literals
      • Literals
      • Other Special Characters
      • Whitespaces
    • Values Representations
      • Objects
      • Arrays
      • Strings
        • Open Strings
        • Regular Strings
        • Raw Strings
      • Numeric Values
        • Number
        • BigInt
        • Decimal
        • Special Numeric Integer Formats
          • Hexadecimal
          • Octal
          • Binary
        • NaN and Infinity
      • Binary
      • Date and Time
      • Booleans
      • Nulls
    • Comments
    • Encoding
  • The Collections
    • Collection
    • Creating Collection
    • Collection Rules
    • Data Streaming
  • The Definitions
    • Definitions
    • Variables
    • Complex Schema
  • Schema Definition Language
    • Internet Object Schema
    • The structure
    • Data Types
      • Any
      • String
        • String Derived Types
          • Email
          • URL
          • Date
          • Time
          • DateTime
      • Number
        • Derived Types
          • int
          • byte
          • int16
          • int32
      • Object
      • Array
      • Bool
    • Dynamic Schema
    • Is Object, a MemberDef or a Schema?
  • Other
    • Best Practices
    • FAQs
    • Contributors
    • License
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Schema Definition Language
  2. Data Types
  3. String

String Derived Types

PreviousStringNextEmail

Last updated 4 years ago

Was this helpful?

Internet object specifies email, url, datetime, date and time as derived types of string and also provides built-in support for them.

The strings and its derived types

The following snippet represents a string and its derived types.

# Strings and its derived types
{ 
  name: string, 
  emailId: email, 
  profileUrl: url,
  journyDate: date,
  departureTime: time,
  bookingDatetime: datetime
   
 }
---
{ 
 Christopher Andrews,                                # string
 [email protected],                      # email
 https://www.abc.com/in/christopher-andrew-06528b155 #url
 2021-02-09                                          # date
 06:30:00                                            # time
 2020-12-30T12:39:48.545                             #datetime
}
  

Here the, name is of string type and will only accept strings. Similarly, emailId, profileUrl, journyDate departureTime and bookingDatetimedate are of different types such as email, url, date, time, datetime. Therefore they will only accept values with the defined types for the respective variable.