VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse Community Snippets›Building & Props·Up to Community Snippets · Building & Props·6 of 7 in Building & Props

Simple Builder

Simple Builder

Verse from sprintermax/UEFNVerseSnippets (VerseLogic/ExtraModules/Encoding/JSON/SimpleBuilder.verse), by sprintermax, under the MIT license. Pinned at commit 92767f566. Compile-checked and ready to adapt for UEFN.

  • SimpleBuilder<public> := module {
        (JSONValue:json_value).AsUEValue<public>()<decides><transacts> : UE_JSON.value = UE_JSON.Parse[JSONValue.Value]
    
        json_value<public> := class<internal><abstract><allocates><computes> { var<protected> Value<public> : string = "" }
    
        json_array<public> := class<final><allocates><computes>(json_value) {
            AddInternal<private>(NewValue:string)<transacts>:json_array = {
                set Value = if (Value.Length <= 2) { "[{NewValue}]" } else {
                    (Value.Slice[0, Value.Length - 1] or "") + ",{NewValue}]"
                }; Self
            }
    
            Add<public>(NewValue:string)<transacts>:json_array = AddInternal("\"{NewValue}\"")
            Add<public>(NewValue:int)<transacts>:json_array = AddInternal("{NewValue}")
            Add<public>(NewValue:float)<transacts>:json_array = AddInternal("{NewValue}")
            Add<public>(JSONValue:json_value)<transacts>:json_array = AddInternal("{JSONValue.Value}")
            AddNull<public>()<transacts>:json_array = AddInternal("null")
        }

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games documentation

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

Keep exploring
More in Building & Props · 6 of 7
Prev
fortnite how to make a prop follow a path
Next
fortnite verse ui canvas element properties

Source

Epic Games documentation

sprintermax

MIT

View original
VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

🦜

Scout · your island guide

The Isle of Verse